<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>class virtual - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/class-virtual/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/class-virtual/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Tue, 14 Sep 2021 05:13:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>class virtual - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/class-virtual/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What is pure virtual function in C++ ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/what-is-pure-virtual-function-in-cpp/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/what-is-pure-virtual-function-in-cpp/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:24:30 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[abstract vs virtual]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[Applied Materials interview questions and answers]]></category>
		<category><![CDATA[Atos interview questions and answers]]></category>
		<category><![CDATA[BMC Software interview questions and answers]]></category>
		<category><![CDATA[Bosch India Software interview questions and answers]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Ciena Corporation interview questions and answers]]></category>
		<category><![CDATA[class virtual]]></category>
		<category><![CDATA[cpp virtual function]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[eInfochips interview questions and answers]]></category>
		<category><![CDATA[Electronics Arts Inc interview questions and answers]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[Harman International interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[Larsen & Toubro interview questions and answers]]></category>
		<category><![CDATA[Mathworks India Private Limited interview questions and answers]]></category>
		<category><![CDATA[Mavenir interview questions and answers]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[NetApp interview questions and answers]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[PeopleStrong interview questions and answers]]></category>
		<category><![CDATA[Philips Software Centre Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[pure virtual]]></category>
		<category><![CDATA[pure virtual class]]></category>
		<category><![CDATA[pure virtual function]]></category>
		<category><![CDATA[pure virtual function call]]></category>
		<category><![CDATA[pure virtual function call error]]></category>
		<category><![CDATA[pure virtual method]]></category>
		<category><![CDATA[pure virtual method called]]></category>
		<category><![CDATA[runtime error pure virtual function call]]></category>
		<category><![CDATA[SRM Technologies interview questions and answers]]></category>
		<category><![CDATA[Symphony Teleca interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[Tecnotree interview questions and answers]]></category>
		<category><![CDATA[telibrahma interview questions and answers]]></category>
		<category><![CDATA[virtual abstract]]></category>
		<category><![CDATA[virtual and pure virtual function]]></category>
		<category><![CDATA[virtual call]]></category>
		<category><![CDATA[virtual class in c++]]></category>
		<category><![CDATA[virtual class in java]]></category>
		<category><![CDATA[virtual example]]></category>
		<category><![CDATA[virtual function]]></category>
		<category><![CDATA[virtual function and pure virtual function]]></category>
		<category><![CDATA[virtual function example]]></category>
		<category><![CDATA[virtual function in java]]></category>
		<category><![CDATA[virtual function table]]></category>
		<category><![CDATA[virtual method]]></category>
		<category><![CDATA[virtual void]]></category>
		<category><![CDATA[what is a virtual method]]></category>
		<category><![CDATA[what is pure virtual function]]></category>
		<category><![CDATA[what is virtual class]]></category>
		<category><![CDATA[what is virtual function]]></category>
		<category><![CDATA[Wipro Infotech interview questions and answers]]></category>
		<category><![CDATA[Wipro interview questions and answers]]></category>
		<category><![CDATA[Yash Technologies interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=370</guid>

					<description><![CDATA[Answer : A virtual function will become pure virtual function...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="what-is-pure-virtual-function-in-c" class="color-pink" style="text-align: justify;">What is pure virtual function in C++ ?</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li style="list-style-type: none;">
<ul>
<li>A virtual function will become pure virtual function when you append &#8220;=0&#8221; at the end of declaration of virtual function.</li>
<li>Pure virtual function doesn&#8217;t have body or implementation. We must implement all pure virtual functions in derived class.</li>
</ul>
</li>
</ul>
<div class="ImageContent">
<div class="hddn"><img decoding="async" class="img-responsive center-block aligncenter" src="https://cdn.wikitechy.com/interview-questions/cpp/what-is-a-pure-virtual-function-in-cpp.png" alt=" What is pure virtual function in C++" /></div>
</div>
<ul>
<li>Pure virtual function is also known as abstract function.</li>
<li>A class with at least one pure virtual function or abstract function is called abstract class. We can&#8217;t create an object of abstract class. Member functions of abstract class will be invoked by derived class object.</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><img decoding="async" class="img-responsive center-block aligncenter" src="https://cdn.wikitechy.com/interview-questions/cpp/pure-virtual-function.png" alt=" pure virtual function" /></div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="sample-code" class="color-purple">Sample Code</h2>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-cpp code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-cpp code-embed-code">#include&lt;iostream.h&gt;<br/>       #include&lt;conio.h&gt;<br/><br/>       class BaseClass       //Abstract class<br/>       {<br/><br/>              public:<br/>               virtual void Display1()=0;     //Pure virtual function or abstract function<br/>               virtual void Display2()=0;     //Pure virtual function or abstract function<br/><br/>               void Method3()<br/>               {<br/>                      cout&lt;&lt;&quot;\n\tMethod3() is Base Class&quot;;<br/>               }<br/><br/>       };<br/><br/>       class DerivedClass : public BaseClass<br/>       {<br/><br/>              public:<br/>               void Method1()<br/>               {<br/>                      cout&lt;&lt;&quot;\n\tMethod1() is Derived Class&quot;;<br/>               }<br/><br/>               void Method2()<br/>               {<br/>                      cout&lt;&lt;&quot;\n\tMethod2() is Derived Class&quot;;<br/>               }<br/><br/>       };<br/><br/>       void main()<br/>       {<br/><br/>              DerivedClass D;<br/><br/>              D.Method1();            // This will invoke Method1() Derived Class<br/>              D.Method2();            // This will invoke Method2() Derived Class<br/>              D.Method3();            // This will invoke Method3() Base Class<br/><br/>       }</code></pre> </div>
<div class="TextHeading">
<div class="hddn">
<h2 id="output" class="color-purple">Output</h2>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-cpp code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-cpp code-embed-code">Method1() is Derived Class<br/>Method2() is Derived Class <br/>Method3() is Base Class</code></pre> </div>
</div>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/what-is-pure-virtual-function-in-cpp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
