<?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>In C++ what is a virtual base class? - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/in-c-what-is-a-virtual-base-class/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/in-c-what-is-a-virtual-base-class/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Tue, 14 Sep 2021 05:03:57 +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>In C++ what is a virtual base class? - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/in-c-what-is-a-virtual-base-class/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Which of the following statements about virtual base classes is correct ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-statements-about-virtual-base-classes-is-correct/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-statements-about-virtual-base-classes-is-correct/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:41:41 +0000</pubDate>
				<category><![CDATA[C++]]></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[C++ Virtual Base Class]]></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[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[how virtual base class works in c++]]></category>
		<category><![CDATA[In C++ what is a virtual base class?]]></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[Sapient Technical and HR Interview Questions]]></category>
		<category><![CDATA[significance of virtual base class]]></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[virtual base class]]></category>
		<category><![CDATA[virtual base class in c++]]></category>
		<category><![CDATA[virtual base class in c++ with example program]]></category>
		<category><![CDATA[Virtual base classes]]></category>
		<category><![CDATA[Virtual class]]></category>
		<category><![CDATA[virtual class in c++]]></category>
		<category><![CDATA[Virtual Function in C++]]></category>
		<category><![CDATA[what is a virtual base class?]]></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=378</guid>

					<description><![CDATA[Answer : B. It is used to avoid multiple copies of base class in derived class.]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h3 id="which-of-the-following-statements-about-virtual-base-classes-is-correct" class="color-pink" style="text-align: justify;">Which of the following statements about virtual base classes is correct ?</h3>
<div class="row" style="text-align: justify;">
<div class="col-sm-12">
<p>A. It is used to provide multiple inheritance .</p>
</div>
<div class="col-sm-12">
<p>B. It is used to avoid multiple copies of base class in derived class .</p>
</div>
<div class="col-sm-12">
<p>C. It is used to allow multiple copies of base class in a derived class.</p>
</div>
<div class="col-sm-12">
<p>D. It allows private members of the base class to be inherited in the derived class.</p>
</div>
</div>
</div>
</div>
<h3 id="answer-b-it-is-used-to-avoid-multiple-copies-of-base-class-in-derived-class" style="text-align: justify;"><b>Answer : </b>B. It is used to avoid multiple copies of base class in derived class .</h3>
<div class="subheading" style="text-align: justify;">
<h2 id="explanation">Explanation</h2>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>When two or more objects are derived from a common base class, we can prevent multiple copies of the base class being present in an object derived from those objects by declaring the base class as virtual when it is being inherited such a base class is known as virtual base class.</li>
<li>Virtual base classes, used in virtual inheritance, is a way of preventing multiple &#8220;instances&#8221; of a given class appearing in an inheritance hierarchy when using multiple inheritance.</li>
</ul>
</div>
</div>
<div class="ImageContent">
<div class="hddn"><img decoding="async" class="img-responsive center-block aligncenter" src="https://cdn.wikitechy.com/interview-questions/cpp/virtual-base-class-in-cpp.png" alt=" Virtual Base Class" /></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-statements-about-virtual-base-classes-is-correct/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
