<?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>Mathworks India Private Limited interview questions and answers - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/mathworks-india-private-limited-interview-questions-and-answers/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/mathworks-india-private-limited-interview-questions-and-answers/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Sat, 18 Sep 2021 06:51:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>Mathworks India Private Limited interview questions and answers - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/mathworks-india-private-limited-interview-questions-and-answers/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Print pyramid triangle in C++</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/print-pyramid-triangle-in-cpp/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/print-pyramid-triangle-in-cpp/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Tue, 13 Jul 2021 00:20:02 +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[area of a triangular pyramid]]></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 program to print patterns of numbers]]></category>
		<category><![CDATA[c program to print patterns of numbers and alphabets]]></category>
		<category><![CDATA[c program to print patterns of numbers and stars in a pyramid shape]]></category>
		<category><![CDATA[c program to print pyramid of numbers in reverse order]]></category>
		<category><![CDATA[c program to print pyramid pattern of numbers]]></category>
		<category><![CDATA[c++ pattern programs]]></category>
		<category><![CDATA[c++ program to print diamond of stars]]></category>
		<category><![CDATA[c++ program to print pyramid of numbers]]></category>
		<category><![CDATA[c++ program to print pyramid using *]]></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[cstar programme]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Diamond pattern programs in c]]></category>
		<category><![CDATA[difficult number pattern programs in c]]></category>
		<category><![CDATA[double pyramid pattern in c]]></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[letter pyramid c++]]></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[nested loop c++ shapes]]></category>
		<category><![CDATA[NetApp interview questions and answers]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[pascal triangle in c++ using array]]></category>
		<category><![CDATA[pascal's triangle formula]]></category>
		<category><![CDATA[pascal's triangle patterns]]></category>
		<category><![CDATA[pattern code]]></category>
		<category><![CDATA[pattern programs in c]]></category>
		<category><![CDATA[pattern programs in java]]></category>
		<category><![CDATA[patterns in c]]></category>
		<category><![CDATA[PeopleStrong interview questions and answers]]></category>
		<category><![CDATA[Philips Software Centre Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[print and pattern]]></category>
		<category><![CDATA[print pascal triangle c++]]></category>
		<category><![CDATA[print pattern]]></category>
		<category><![CDATA[programming patterns]]></category>
		<category><![CDATA[pyramid of numbers]]></category>
		<category><![CDATA[pyramid program in c]]></category>
		<category><![CDATA[pyramid program in c with explanation]]></category>
		<category><![CDATA[pyramid shape]]></category>
		<category><![CDATA[right triangle c++]]></category>
		<category><![CDATA[square based pyramid]]></category>
		<category><![CDATA[SRM Technologies interview questions and answers]]></category>
		<category><![CDATA[star pattern]]></category>
		<category><![CDATA[star pattern in c]]></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[toughest pattern programs in c]]></category>
		<category><![CDATA[triangular pyramid]]></category>
		<category><![CDATA[volume of a square based pyramid]]></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=406</guid>

					<description><![CDATA[Answer : To print pyramid triangle in C++, we have use two for loop...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="print-pyramid-triangle-in-c" class="color-pink" style="text-align: justify;">Print pyramid triangle in C++</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>To print pyramid <a href="https://www.wikitechy.com/tutorials/csharp/csharp-fibonacci-series" target="_blank" rel="noopener">triangle</a> in C++, we have use two for loop, the outer for loop and the inner for loop.</li>
<li>The outer for loop is responsible for rows and the inner for loop is responsible for column.</li>
<li>C++ programs to print different types of <a href="https://www.wikitechy.com/technology/c-program-to-print-patterns-of-numbers-and-stars/" target="_blank" rel="noopener">patterns using stars(*)</a>, numbers, and characters or alphabets.</li>
<li>This C++ program prints the full pyramid using stars(*).</li>
</ul>
<h2 id="sample-code-in-c" class="color-purple">Sample Code in C++</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&gt;<br/>using namespace std;<br/>   int main()<br/>{<br/>    int j, rows;<br/>       cout &lt;&lt;&quot;Enter number of rows: &quot;;<br/>    cin &gt;&gt; rows;<br/>       for(int i = 1, k = 0; i &lt;= rows; ++i, k = 0)<br/>    {<br/>        for(j = 1; j &lt;= rows-i; ++j)<br/>        {<br/>            cout &lt;&lt;&quot;  &quot;;<br/>        }<br/>        while(k != 2*i-1)<br/>        {<br/>            cout &lt;&lt; &quot;* &quot;;<br/>            ++k;<br/>        }<br/>        cout &lt;&lt; endl;<br/>    }    <br/>    return 0;<br/>}</code></pre> </div>
<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">Enter number of rows : 7   <br/>            * <br/>          * * * <br/>        * * * * * <br/>      * * * * * * * <br/>    * * * * * * * * * <br/>  * * * * * * * * * * * <br/>* * * * * * * * * * * * * </code></pre> </div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/print-pyramid-triangle-in-cpp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>C++ Inheritance</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/c-inheritance/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/c-inheritance/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Tue, 13 Jul 2021 00:10: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[basic c++ program examples]]></category>
		<category><![CDATA[best c++ compiler]]></category>
		<category><![CDATA[best way to learn c++]]></category>
		<category><![CDATA[BMC Software interview questions and answers]]></category>
		<category><![CDATA[Bosch India Software interview questions and answers]]></category>
		<category><![CDATA[c programming examples]]></category>
		<category><![CDATA[c++ book]]></category>
		<category><![CDATA[c++ compiler download]]></category>
		<category><![CDATA[c++ compiler windows 10]]></category>
		<category><![CDATA[c++ compiler windows 7]]></category>
		<category><![CDATA[c++ derived class]]></category>
		<category><![CDATA[c++ friend functions]]></category>
		<category><![CDATA[c++ inheritance]]></category>
		<category><![CDATA[c++ inheritance example]]></category>
		<category><![CDATA[c++ inheritance example program]]></category>
		<category><![CDATA[c++ inheritance program]]></category>
		<category><![CDATA[c++ learn]]></category>
		<category><![CDATA[c++ program for multilevel inheritance]]></category>
		<category><![CDATA[c++ tutorial for beginners]]></category>
		<category><![CDATA[C++ Tutorial for Complete Beginners]]></category>
		<category><![CDATA[c++ tutorial pdf]]></category>
		<category><![CDATA[c++ tutorial point]]></category>
		<category><![CDATA[C++ Tutorials]]></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[define inheritance]]></category>
		<category><![CDATA[definition of inheritance]]></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[hierarchical inheritance]]></category>
		<category><![CDATA[hierarchical inheritance in c++]]></category>
		<category><![CDATA[hierarchical inheritance in c++ with example program]]></category>
		<category><![CDATA[hybrid inheritance c++ program]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[inheritance c++]]></category>
		<category><![CDATA[inheritance example]]></category>
		<category><![CDATA[inheritance in c++]]></category>
		<category><![CDATA[inheritance in c++ programming]]></category>
		<category><![CDATA[inheritance in c++ with example]]></category>
		<category><![CDATA[inheritance in c++ with example program]]></category>
		<category><![CDATA[inheritance in oop]]></category>
		<category><![CDATA[inheritance meaning]]></category>
		<category><![CDATA[intel c++ compiler]]></category>
		<category><![CDATA[khan academy c++]]></category>
		<category><![CDATA[Larsen & Toubro interview questions and answers]]></category>
		<category><![CDATA[learn c++ codecademy]]></category>
		<category><![CDATA[learn c++ pdf]]></category>
		<category><![CDATA[learn c++ programming in 21 days for beginners]]></category>
		<category><![CDATA[learn c++ reddit]]></category>
		<category><![CDATA[learn c++ the hard way]]></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[multilevel inheritance]]></category>
		<category><![CDATA[multiple inheritance]]></category>
		<category><![CDATA[multiple inheritance c++ example]]></category>
		<category><![CDATA[multiple inheritance c++ program]]></category>
		<category><![CDATA[multiple inheritance in c++ example]]></category>
		<category><![CDATA[NetApp interview questions and answers]]></category>
		<category><![CDATA[Online C/C++ Tutorial Academy]]></category>
		<category><![CDATA[online turbo c++ compiler]]></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[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[types of inheritance]]></category>
		<category><![CDATA[types of inheritance in c++ with example program]]></category>
		<category><![CDATA[virtual inheritance]]></category>
		<category><![CDATA[what is inheritance]]></category>
		<category><![CDATA[what is inheritance in cpp]]></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=404</guid>

					<description><![CDATA[Answer : Inheritance is one of the key features of Object-oriented programming...]]></description>
										<content:encoded><![CDATA[<div class="ImageContent">
<div class="hddn" style="text-align: justify;"><a href="https://cdn.wikitechy.com/interview-questions/c++/c++-inheritance.gif"><img decoding="async" class="img-responsive center-block" src="https://www.wikitechy.com/tutorials/c++/img/c++-images/c++-inheritance.gif" alt=" c++-inheritance" /></a></div>
<div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><a href="https://cdn.wikitechy.com/interview-questions/c++/c++-inheritance.jpg"><img decoding="async" class="img-responsive center-block aligncenter" src="https://www.wikitechy.com/tutorials/c++/img/c++-images/c++-inheritance.jpg" alt=" c++ inheritance" /></a></div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="inheritance-in-c" class="color-pink">Inheritance in C++</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Inheritance is one of the key features of Object-oriented programming in C++. It allows user to create a new class (derived class) from an existing class(base class).</li>
<li>The derived class inherits all the features from the base class and can have additional features of its own</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://www.wikitechy.com/tutorials/c++/img/c++-images/multiple-inheritance-1.gif" alt="learn c++ tutorials - inheritance in c++" /></div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="base-derived-classes" class="color-green">Base &amp; Derived Classes</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>A class can be derived from more than one classes, which means it can inherit data and functions from multiple base classes.</li>
<li>To define a derived class, we use a class derivation list to specify the base class(es).</li>
<li>A class derivation list names one or more base classes and has the form:</li>
</ul>
</div>
</div>
<div class="Output" style="text-align: justify;">
<div class="hddn">
<figure class="highlight">
<pre><code class="c++ hljs typescript" data-lang="c++"><span class="nt"><span class="hljs-keyword">class</span> derived-<span class="hljs-keyword">class</span>: access-specifier base-<span class="hljs-keyword">class</span></span></code></pre>
</figure>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Where access-specifier is one of public, protected, or private, and base-class is the name of a previously defined class.</li>
<li>If the access-specifier is not used, then it is private by default.</li>
</ul>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="why-inheritance-should-be-used" class="color-pink">Why inheritance should be used?</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Suppose, in your game, you want three characters &#8211; a maths teacher, a footballer and a businessman.</li>
<li>Since, all of the characters are persons, they can walk and talk. However, they also have some special skills. A maths teacher can teach maths, a footballer can play football and a businessman can run a business.</li>
<li>You can individually create three classes who can walk, talk and perform their special skill as shown in the figure below.</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><a href="https://cdn.wikitechy.com/interview-questions/c++/c++-inherit.jpg"><img decoding="async" class="img-responsive center-block aligncenter" src="https://www.wikitechy.com/tutorials/c++/img/c++-images/c++-inherit.jpg" alt=" c++ inheritances" /></a></div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>In each of the classes, you would be copying the same code for walk and talk for each character.</li>
<li>If you want to add a new feature &#8211; eat, you need to implement the same code for each character. This can easily become error prone (when copying) and duplicate codes.</li>
<li>It&#8217;d be a lot easier if we had a Person class with basic features like talk, walk, eat, sleep, and add special skills to those features as per our characters. This is done using inheritance.</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><a href="https://cdn.wikitechy.com/interview-questions/c++/c+ineritance-multiple.jpg"><img decoding="async" class="img-responsive center-block" src="https://www.wikitechy.com/tutorials/c++/img/c++-images/c+ineritance-multiple.jpg" alt=" c++ inheritances multiple" /></a></div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Using inheritance, now you don&#8217;t implement the same code for walk and talk for each class. You just need to inherit them.</li>
<li>This makes your code cleaner, understandable and extendable</li>
</ul>
</div>
</div>
<div class="TextHeading">
<div class="hddn">
<h6 id="learn-c-c-tutorial-c-programming-c-language-cplusplus" style="text-align: justify;">Learn C++ , C++ Tutorial , C++ programming &#8211; C++ Language -Cplusplus</h6>
<h5 id="implementation-of-inheritance-in-c-programming" class="color-blue" style="text-align: justify;">Implementation of Inheritance in C++ Programming</h5>
<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">class Person <br/>{<br/>  ... .. ...<br/>};<br/>class MathsTeacher : public Person <br/>{<br/>  ... .. ...<br/>};<br/>class Footballer : public Person<br/>{<br/>  .... .. ...<br/>};</code></pre> </div>
<ul style="text-align: justify;">
<li>In the above example, class Person is a base class and classes MathsTeacher andFootballer are the derived from Person.</li>
<li>The derived class appears with the declaration of a class followed by a colon, the keywordpublic and the name of base class from which it is derived.</li>
<li>Since, MathsTeacher and Footballer are derived from Person, all data member and member function of Person can be accessible from them</li>
</ul>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="example-inheritance-in-c-programming" class="color-red">Example: Inheritance in C++ Programming</h2>
</div>
</div>
<div class="Content">
<div class="hddn">
<ul style="text-align: justify;">
<li>Create game characters using the concept of inheritance.</li>
</ul>
<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&gt;<br/>using namespace std;<br/><br/>class Person<br/>{<br/>     public:<br/>        string profession;<br/>        int age;<br/><br/>        Person(): profession(&quot;unemployed&quot;), age(16) { }<br/>        void display()<br/>        {<br/>             cout &lt;&lt; &quot;My profession is: &quot; &lt;&lt; profession &lt;&lt; endl;<br/>             cout &lt;&lt; &quot;My age is: &quot; &lt;&lt; age &lt;&lt; endl;<br/>             walk();<br/>             talk();<br/>        }<br/>        void walk() { cout &lt;&lt; &quot;I can walk.&quot; &lt;&lt; endl; }<br/>        void talk() { cout &lt;&lt; &quot;I can talk.&quot; &lt;&lt; endl; }<br/>};<br/><br/>// MathsTeacher class is derived from base class Person.<br/>class MathsTeacher : public Person<br/>{<br/>    public:<br/>       void teachMaths() { cout &lt;&lt; &quot;I can teach Maths.&quot; &lt;&lt; endl; }<br/>};<br/><br/>// Footballer class is derived from base class Person.<br/>class Footballer : public Person<br/>{<br/>    public:<br/>       void playFootball() { cout &lt;&lt; &quot;I can play Football.&quot; &lt;&lt; endl; }<br/>};<br/><br/>int main()<br/>{<br/>     MathsTeacher teacher;<br/>     teacher.profession = &quot;Teacher&quot;;<br/>     teacher.age = 23;<br/>     teacher.display();<br/>     teacher.teachMaths();<br/><br/>     Footballer footballer;<br/>     footballer.profession = &quot;Footballer&quot;;<br/>     footballer.age = 19;<br/>     footballer.display();<br/>     footballer.playFootball();<br/><br/>     return 0;<br/>}</code></pre> </div>
<h2 id="output" class="color-purple" style="text-align: justify;">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">My profession is: Teacher<br/>My age is: 23<br/>I can walk.<br/>I can talk.<br/>I can teach Maths.<br/>My profession is: Footballer<br/>My age is: 19<br/>I can walk.<br/>I can talk.<br/>I can play Football.</code></pre> </div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>In this program, Person is a base class, while MathsTeacher and Footballer are derived from Person</li>
<li>Person class has two data members &#8211; profession and age. It also has two member functions &#8211; walk() and talk().</li>
<li>Both MathsTeacher and Footballer can access all data members and member functions of Person.</li>
<li>However, MathsTeacher and Footballer have their own member functions as well:teachMaths() and playFootball() respectively. These functions are only accessed by their own class.</li>
<li>In the main() function, a new MathsTeacher object teacher is created.</li>
<li>Since, it has access to Person&#8217;s data members, profession and age of teacher is set. This data is displayed using the display() function defined in the Person class. Also, the teachMaths() function is called, defined in the MathsTeacher class.</li>
<li>Likewise, a new Footballer object footballer is also created. It has access to Person&#8217;s data members as well, which is displayed by invoking the display() function. The playFootball() function only accessible by the footballer is called then after.</li>
</ul>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="access-specifiers-in-inheritance" class="color-orange">Access specifiers in Inheritance</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>When creating a derived class from a base class, you can use different access specifiers to inherit the data members of the base class.</li>
<li>These can be public, protected or private.</li>
<li>In the above example, the base class Person has been inherited public-ly by MathsTeacherand Footballer.</li>
</ul>
</div>
</div>
<div class="TextHeading">
<div class="hddn">
<h2 id="member-function-overriding-in-inheritance" class="color-green" style="text-align: justify;">Member Function Overriding in Inheritance</h2>
<ul style="text-align: justify;">
<li>Suppose, base class and derived class have member functions with same name and arguments.</li>
<li>If you create an object of the derived class and try to access that member function, the member function in derived class is only invoked.</li>
<li>The member function of derived class overrides the member function of base class.</li>
</ul>
<p style="text-align: justify;">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/c-inheritance/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Dangling Pointer ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/dangling-pointer/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/dangling-pointer/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 23:36:28 +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[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[dangling examples]]></category>
		<category><![CDATA[dangling meaning]]></category>
		<category><![CDATA[dangling memory]]></category>
		<category><![CDATA[dangling memory in c]]></category>
		<category><![CDATA[dangling pointer]]></category>
		<category><![CDATA[dangling pointer and memory leak]]></category>
		<category><![CDATA[dangling pointer definition]]></category>
		<category><![CDATA[dangling pointer example]]></category>
		<category><![CDATA[dangling pointer in c example]]></category>
		<category><![CDATA[dangling pointer in c language]]></category>
		<category><![CDATA[dangling pointer in c++]]></category>
		<category><![CDATA[dangling pointer in cmemory leak in c]]></category>
		<category><![CDATA[dangling pointer in cpp]]></category>
		<category><![CDATA[dangling pointer in data structure]]></category>
		<category><![CDATA[dangling pointer in java]]></category>
		<category><![CDATA[dangling pointer mcq]]></category>
		<category><![CDATA[dangling pointer points to]]></category>
		<category><![CDATA[dangling pointer tutorialspoint]]></category>
		<category><![CDATA[dangling reference]]></category>
		<category><![CDATA[dangling tool]]></category>
		<category><![CDATA[define dangling]]></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 can you create a dangling pointer]]></category>
		<category><![CDATA[how to avoid dangling pointer in c]]></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[null pointer in cnull pointer c++]]></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[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[types of pointers in c]]></category>
		<category><![CDATA[uninitialized pointer]]></category>
		<category><![CDATA[void pointer in c]]></category>
		<category><![CDATA[what is dangling]]></category>
		<category><![CDATA[what is dangling pointer]]></category>
		<category><![CDATA[what is dangling pointer and how to avoid it]]></category>
		<category><![CDATA[what is dangling pointer in c]]></category>
		<category><![CDATA[what is dangling reference]]></category>
		<category><![CDATA[what is the meaning of dangling]]></category>
		<category><![CDATA[wild pointer in c]]></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=402</guid>

					<description><![CDATA[Answer : A dangling pointer is pointing to a memory location...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="dangling-pointer" class="color-pink" style="text-align: justify;">Dangling Pointer</h2>
</div>
</div>
<div class="Content">
<div class="hddn" style="text-align: justify;">
<ul>
<li>A dangling pointer is pointing to a memory location that has been deleted (or freed). The dangling pointer act as a different ways there are,
<ul>
<li>De-allocation of memory</li>
<li>Function Call</li>
<li>Variable goes out of scope</li>
</ul>
</li>
</ul>
</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/dangling-pointers.png" alt=" " /></div>
</div>
<div class="TextHeading">
<div class="hddn">
<h2 id="de-allocation-of-memory" class="color-blue" style="text-align: justify;">De-allocation of memory</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;stdlib.h&gt;<br/>void main()<br/>{<br/>    char *ptr = malloc(Constant_Value);<br/>    free (ptr); //ptr now becomes a dangling pointer<br/>}</code></pre> </div>
<ul style="text-align: justify;">
<li>First we have declared in the character pointer. After execution of some statements we have de-allocated memory which is allocated previously for the pointer.</li>
<li>Immediately memory is de-allocated for pointer, pointer becomes dangling pointer.</li>
</ul>
<h2 id="function-call" class="color-blue" style="text-align: justify;">Function Call</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">int * func ( void )<br/>{<br/>    int num = 14;<br/>    return #<br/>}</code></pre> </div>
<ul style="text-align: justify;">
<li>The pointer may be return the correct value (1234) for a while after calling <b>func</b>, but any functions called thereafter will overwrite the stack storage allocated for <b>num</b> with other values and the pointer would no longer work correctly.</li>
<li>If a pointer to num must be returned, num must have scope beyond the function it might be declared as static.</li>
</ul>
<h2 id="variable-goes-out-of-scope" class="color-blue" style="text-align: justify;">Variable goes out of scope</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;stdlib.h&gt;<br/>void main()<br/>{<br/>    char *ptr = NULL;<br/>    {<br/>        char ch;<br/>        ptr = &amp;ch;<br/>    }//dp is now a dangling pointer<br/>}</code></pre> </div>
<ul style="text-align: justify;">
<li>First we have declared in the Character Pointer.</li>
<li>Next the Pointer Variable ‘ptr’ is pointing to Character Variable ‘ch’ declared in the inner block .</li>
<li>As character variable is non-visible in Outer Block , then Pointer is still pointing to Same Invalid memory location in Outer block , then Pointer becomes “Dangling”.</li>
</ul>
<p style="text-align: justify;">
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/dangling-pointer/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Finding all substrings of a given number that are divisible by 11</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/finding-all-substrings-of-a-given-number-that-are-divisible-by-11/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/finding-all-substrings-of-a-given-number-that-are-divisible-by-11/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 23:25:00 +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[array maximum sum divisible by n in c]]></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++ int to string]]></category>
		<category><![CDATA[c++ string]]></category>
		<category><![CDATA[c++ string contains charfind position of character in string c++]]></category>
		<category><![CDATA[c++ string length]]></category>
		<category><![CDATA[c++ string nposfind substring in char array c++]]></category>
		<category><![CDATA[c++ string to int]]></category>
		<category><![CDATA[c++ substring]]></category>
		<category><![CDATA[c++ substring before character]]></category>
		<category><![CDATA[c++ substring from end]]></category>
		<category><![CDATA[c++ substring from index to end]]></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[consecutive subsequences whose sum is divisible by k.]]></category>
		<category><![CDATA[continuous subarray sum multiple of k]]></category>
		<category><![CDATA[count subarrays with sum k]]></category>
		<category><![CDATA[declare string in c++]]></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[find all occurrences of a substring in a string c++]]></category>
		<category><![CDATA[find character in string c++]]></category>
		<category><![CDATA[find occurrence of character in string c++]]></category>
		<category><![CDATA[find substring in string c++]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[function of library]]></category>
		<category><![CDATA[Harman International interview questions and answers]]></category>
		<category><![CDATA[how to divide a string into substrings in c++]]></category>
		<category><![CDATA[how to find a letter in a string c++]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[Larsen & Toubro interview questions and answers]]></category>
		<category><![CDATA[MagicBricks 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[number of subsequences divisible by n]]></category>
		<category><![CDATA[number of subsequences in a array divisible by n]]></category>
		<category><![CDATA[number of subsequences in a string]]></category>
		<category><![CDATA[number of subsequences in a string divisible by n]]></category>
		<category><![CDATA[number of subsequences whose sum is divisible by n]]></category>
		<category><![CDATA[number of times a string occurs as a subsequence]]></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[print string in c++]]></category>
		<category><![CDATA[program to find substring in a string in c++]]></category>
		<category><![CDATA[reverse substring c++]]></category>
		<category><![CDATA[sort substring c++]]></category>
		<category><![CDATA[SRM Technologies interview questions and answers]]></category>
		<category><![CDATA[string functions in c++]]></category>
		<category><![CDATA[string in c++ programming]]></category>
		<category><![CDATA[string length in c++]]></category>
		<category><![CDATA[string match c++]]></category>
		<category><![CDATA[string programs in c++]]></category>
		<category><![CDATA[string to int c++]]></category>
		<category><![CDATA[strings in c]]></category>
		<category><![CDATA[subsequence sum divisible by k]]></category>
		<category><![CDATA[subset with sum divisible by m]]></category>
		<category><![CDATA[substr c++]]></category>
		<category><![CDATA[substr in c]]></category>
		<category><![CDATA[substring c++]]></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[what is string in c++]]></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=400</guid>

					<description><![CDATA[Answer : Query(l, r) : find if the sub-string between the indices l and r....
]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="finding-all-substrings-of-a-given-number-that-are-divisible-by-11" class="color-pink" style="text-align: justify;">Finding all substrings of a given number that are divisible by 11</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<p>To find easy to way of Divisibility by 11,</p>
<ul>
<li>The multiples of 11: 22, 33, 44, 55, etc. But we did&#8217;t easy to find the number 2728, 54695 is divisible by 11.</li>
<li>Here an easy way to test for divisibility by 11. Take the alternating sum of the digits in the number, read from left to right. If that is divisible by 11, so is the original number.</li>
<li>So, for example, 2728 has alternating sum of digits 2-7+2-8 = -11. Since -11 is divisible by 11, so is 2728.</li>
<li>Similarly, for 54695, the alternating sum of digits is 5-4+6-9+5 = 3. This is not divisible by 11, so neither is 54695.</li>
</ul>
<div class="TextHeading">
<div class="hddn">
<h2 id="given-a-large-number-n-having-number-digits-up-to-106-and-various-queries-of-the-below-form" class="color-purple">Given a large number, n (having number digits up to 10^6) and various queries of the below form :</h2>
</div>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li>Query(l, r) : find if the <a href="https://www.wikitechy.com/technology/longest-even-length-substring-sum-first-second-half/" target="_blank" rel="noopener">sub-string</a> between the indices l and r (Both inclusive) are divisible by 11.</li>
</ul>
</div>
</div>
<div class="TextHeading">
<div class="hddn">
<h2 id="input" class="color-green">Input</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">n = 122164154695<br/>Queries: l = 0 r = 3, l = 1 r = 2, l = 5 r = 9, l = 0 r = 11</code></pre> </div>
<div class="TextHeading">
<div class="hddn">
<h2 id="output" class="color-green">Output</h2>
</div>
</div>
<div class="Output">
<div class="hddn">
<figure class="highlight"><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">True<br/>True<br/>False<br/>True</code></pre> </div>
<div class="TextHeading">
<div class="hddn">
<h2 id="explanation" class="color-red">Explanation</h2>
</div>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li>In the first query, 1221 is divisible by 11.</li>
<li>In the second query, 22 is divisible by 11 and so on.</li>
<li>We know that any number is divisible by 11 if the difference between sum of odd indexed digits and the sum of even indexed digits is divisible by 11, i.e.,</li>
</ul>
</div>
</div>
<div class="TextHeading">
<div class="hddn">
<h4 id="sumdigits-at-odd-places-sumdigits-at-even-places-should-be-divisible-by-11" class="color-blue">Sum(digits at odd places) &#8211; Sum(digits at even places) should be divisible by 11.</h4>
<h2 id="sample-code" class="color-red">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&gt; <br/>using namespace std; <br/>  <br/>const int MAX = 1000005; <br/>  <br/>// To store sums of even and odd digits <br/>struct OddEvenSums <br/>{ <br/>    int e_sum; // Sum of even placed digits <br/>  <br/>    int o_sum; // Sum of odd placed digits <br/>}; <br/>  <br/>OddEvenSums sum[MAX]; // Auxiliary array <br/>  <br/>// Utility function to evaluate a character&#039;s <br/>// integer value <br/>int toInt(char x) <br/>{ <br/>    return int(x) - 48; <br/>} <br/>  <br/>// This function receives the string representation <br/>// of the number and precomputes the sum array <br/>void preCompute(string x) <br/>{  <br/>    sum[0].e_sum = sum[0].o_sum = 0; // Initialize everb <br/>  <br/>    // Add the respective digits depending on whether <br/>    // they&#039;re even indexed or odd indexed <br/>    for (int i=0; i&lt;x.length(); i++) <br/>    { <br/>        if (i%2==0) <br/>        { <br/>            sum[i+1].e_sum = sum[i].e_sum+toInt(x[i]); <br/>            sum[i+1].o_sum = sum[i].o_sum; <br/>        } <br/>        else<br/>        { <br/>            sum[i+1].o_sum = sum[i].o_sum+toInt(x[i]); <br/>            sum[i+1].e_sum = sum[i].e_sum; <br/>        } <br/>    } <br/>} <br/>  <br/>// This function receives l and r representing <br/>// the indices and prints the required output <br/>bool query(int l,int r) <br/>{ <br/>    int diff = (sum[r+1].e_sum - sum[r+1].o_sum) - (sum[l].e_sum - sum[l].o_sum); <br/>  <br/>    return (diff%11==0); <br/>} <br/>  <br/>//driver function to check the program <br/>int main() <br/>{ <br/>    string s = &quot;122164154695&quot;; <br/>  <br/>    preCompute(s); <br/>  <br/>    cout &lt;&lt; query(0, 3) &lt;&lt; endl; <br/>    cout &lt;&lt; query(1, 2) &lt;&lt; endl; <br/>    cout &lt;&lt; query(5, 9) &lt;&lt; endl; <br/>    cout &lt;&lt; query(0, 11) &lt;&lt; endl; <br/>  <br/>    return 0; <br/>} </code></pre> </div>
<div class="TextHeading">
<div class="hddn">
<h2 id="output-2" class="color-red">Output</h2>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-markup code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-markup code-embed-code">1 <br/>1<br/>0<br/>1</code></pre> </div>
</div>
</div>
</div>
</div>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/finding-all-substrings-of-a-given-number-that-are-divisible-by-11/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is the best way to sort an array of 0s and 1s ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/what-is-the-best-way-to-sort-an-array-of-0s-and-1s/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/what-is-the-best-way-to-sort-an-array-of-0s-and-1s/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 23:13:59 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[all sorting programs in c++]]></category>
		<category><![CDATA[Applied Materials interview questions and answers]]></category>
		<category><![CDATA[array sort]]></category>
		<category><![CDATA[array sort c++]]></category>
		<category><![CDATA[array sorting in c]]></category>
		<category><![CDATA[arraylist sort]]></category>
		<category><![CDATA[ascending order program in c++ using for loop]]></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[bubble sort c++]]></category>
		<category><![CDATA[c++ container sort]]></category>
		<category><![CDATA[c++ program to sort an array in ascending order using functionsort array c++ ascending function]]></category>
		<category><![CDATA[c++ program to sort an array in descending order]]></category>
		<category><![CDATA[c++ set sort]]></category>
		<category><![CDATA[c++ sort array]]></category>
		<category><![CDATA[c++ sort array alphabetically]]></category>
		<category><![CDATA[c++ sort custom comparator]]></category>
		<category><![CDATA[c++ sort vector of doubles]]></category>
		<category><![CDATA[c++ sort vector of strings]]></category>
		<category><![CDATA[c++ sort vector of strings alphabetically]]></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[compro technologies 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 to sort an array]]></category>
		<category><![CDATA[how to sort an array in c++]]></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[q sort function in c++]]></category>
		<category><![CDATA[sort array c++ ascending]]></category>
		<category><![CDATA[sort deque c++]]></category>
		<category><![CDATA[sort float vector c++]]></category>
		<category><![CDATA[sort function in c]]></category>
		<category><![CDATA[sort part of array c++]]></category>
		<category><![CDATA[sort part of vector c++]]></category>
		<category><![CDATA[sort string array in java]]></category>
		<category><![CDATA[sort vector in descending order c++]]></category>
		<category><![CDATA[sorting an array in c++ program]]></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[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=398</guid>

					<description><![CDATA[Answer : Sort an array elements means arrange...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="what-is-the-best-way-to-sort-an-array-of-0s-and-1s" class="color-pink" style="text-align: justify;">What is the best way to sort an array of 0s and 1s ?</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li><a href="https://www.wikitechy.com/tutorials/java/how-to-sort-string-array-in-java" target="_blank" rel="noopener">Sort an array</a> elements means arrange elements of array in <a href="https://www.wikitechy.com/angularjs/angularjs-orderby-filter" target="_blank" rel="noopener">ascending order and descending order</a>.</li>
</ul>
</div>
</div>
<p style="text-align: justify;">Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s and all 2s in last.</p>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="example" class="color-purple">Example</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">Input :  {0, 1, 2, 0, 1, 2}<br/>Output : {0, 0, 1, 1, 2, 2}<br/>Input :  {0, 1, 1, 0, 1, 2, 1, 2, 0, 0, 0, 1}<br/>Output : {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2}</code></pre> </div>
</div>
</div>
<div class="Output" style="text-align: justify;">
<div class="hddn">
<figure class="highlight">
<pre><code class="hljs" data-lang=""></code><img decoding="async" class="img-responsive center-block aligncenter" src="https://cdn.wikitechy.com/interview-questions/cpp/sort-an-array-of-0s-and-1s.gif" alt=" Sort" /></pre>
</figure>
</div>
</div>
<div class="CodeContent" style="text-align: justify;">
<div class="hddn">
<figure class="highlight">
<div class="TextHeading">
<div class="hddn">
<h2 id="sample-code-in-c" class="color-purple">Sample code in C++</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;bits/stdc++.h&gt;<br/>using namespace std; <br/>  <br/>// Function to segregate 0s and 1s <br/>void segregate0and1(intarr[], int n) <br/>{ <br/>    int count = 0; // Counts the no of zeros in arr<br/>  	<br/>    for (inti = 0; i&lt; n; i++) { <br/>        if (arr[i] == 0) <br/>            count++; <br/>    } <br/>  <br/>    // Loop fills the arr with 0 until count <br/>    for (inti = 0; i&lt; count; i++) <br/>        arr[i] = 0; <br/>  <br/>    // Loop fills remaining arr space with 1 <br/>    for (inti = count; i&lt; n; i++) <br/>        arr[i] = 1; <br/>} <br/>  <br/>// Function to print segregated array <br/>void print(intarr[], int n) <br/>{ <br/>    cout&lt;&lt; &quot;Array after segregation is &quot;; <br/>  <br/>    for (inti = 0; i&lt; n; i++) <br/>        cout&lt;&lt;arr[i] &lt;&lt; &quot; &quot;; <br/>} <br/>  <br/>// Driver function <br/>int main() <br/>{ <br/>    intarr[] = { 0, 1, 0, 1, 1, 1 }; <br/>    int n = sizeof(arr) / sizeof(arr[0]); <br/>      <br/>    segregate0and1(arr, n); <br/>    print(arr, n); <br/>      <br/>    return 0; <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">Array after segregation is 0 0 1 1 1 1</code></pre> </div>
</div>
</div>
</div>
</div>
</figure>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/what-is-the-best-way-to-sort-an-array-of-0s-and-1s/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Find Largest number from set of given numbers ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/find-largest-number-from-set-of-given-numbers/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/find-largest-number-from-set-of-given-numbers/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 23:08:03 +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[arrange given numbers to form the biggest number c#]]></category>
		<category><![CDATA[arrange given numbers to form the biggest number in c++]]></category>
		<category><![CDATA[arrange given numbers to form the biggest number in python]]></category>
		<category><![CDATA[arrange given numbers to form the biggest number java]]></category>
		<category><![CDATA[arrange given numbers to form the biggest number javascript]]></category>
		<category><![CDATA[arrange the numbers to form the biggest number]]></category>
		<category><![CDATA[Atos interview questions and answers]]></category>
		<category><![CDATA[biggest number ever]]></category>
		<category><![CDATA[biggest numbers list]]></category>
		<category><![CDATA[biggest possible number]]></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[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[find largest number possible by rearranging the number.]]></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[infrrd interview questions and answers]]></category>
		<category><![CDATA[largest concatenated number in c]]></category>
		<category><![CDATA[largest number formed from an array in c++]]></category>
		<category><![CDATA[largest possible number with digits in c]]></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[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[the biggest number]]></category>
		<category><![CDATA[what is the biggest four digit number]]></category>
		<category><![CDATA[what is the biggest number]]></category>
		<category><![CDATA[what is the biggest number besides infinity]]></category>
		<category><![CDATA[what is the biggest number ever]]></category>
		<category><![CDATA[what is the biggest number possibleis google the biggest number]]></category>
		<category><![CDATA[what is the biggest number with three 3's]]></category>
		<category><![CDATA[what's the biggest number]]></category>
		<category><![CDATA[which is the biggest number]]></category>
		<category><![CDATA[which number is the biggest]]></category>
		<category><![CDATA[Wipro Infotech interview questions and answers]]></category>
		<category><![CDATA[Wipro interview questions and answers]]></category>
		<category><![CDATA[write a program to arrange them such that they form the largest number.]]></category>
		<category><![CDATA[Yash Technologies interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=396</guid>

					<description><![CDATA[Answer : Find number of digits in the largest number. Let us assume number of digits be n...
]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="find-largest-number-from-set-of-given-numbers" class="color-pink" style="text-align: justify;">Find Largest number from set of given numbers ?</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Find number of digits in the largest number. Let us assume number of digits be n.</li>
<li>Create extended version of all numbers. In extended version, we have n+1 digit formed by concatenating the number of with itself and <a href="https://www.wikitechy.com/tutorials/sql/truncate-table" target="_blank" rel="noopener">truncating</a> extra digits.</li>
<li><a href="https://www.wikitechy.com/tutorials/golang/sorting-in-golang" target="_blank" rel="noopener">Sorting</a> the value from original numbers according to their extended values.</li>
<li><a href="https://www.wikitechy.com/tutorials/sql/concat-sql" target="_blank" rel="noopener">Concatenating</a> to the sorted numbers produce the required result.</li>
</ul>
</div>
</div>
<div class="text-center row" style="text-align: justify;"></div>
<div class="TextHeading">
<div class="hddn">
<h2 id="sample-code-in-c" class="color-blue" style="text-align: justify;">Sample Code in C++</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">/ Given an array of numbers, program to arrange the numbers to form the <br/>// largest number <br/>#include &lt;iostream&gt; <br/>#include &lt;string&gt; <br/>#include &lt;vector&gt; <br/>#include &lt;algorithm&gt; <br/>using namespace std; <br/>  <br/>// A comparison function which is used by sort() in printLargest() <br/>int myCompare(string X, string Y) <br/>{ <br/>    // first append Y at the end of X <br/>    string XY = X.append(Y); <br/>  <br/>    // then append X at the end of Y <br/>    string YX = Y.append(X); <br/>  <br/>    // Now see which of the two formed numbers is greater <br/>    return XY.compare(YX) &gt; 0 ? 1: 0; <br/>} <br/>  <br/>// The main function that prints the arrangement with the largest value. <br/>// The function accepts a vector of strings <br/>void printLargest(vector&lt;string&gt; arr) <br/>{ <br/>    sort(arr.begin(), arr.end(), myCompare); <br/>  <br/>    for (int i=0; i &lt; arr.size() ; i++ ) <br/>        cout &lt;&lt; arr[i]; <br/>} <br/>  <br/>// driver program to test above functions <br/>int main() <br/>{ <br/>    vector&lt;string&gt; arr; <br/>  <br/>    //output should be 5545727825 <br/>	arr.push_back(&quot;25&quot;); <br/>	arr.push_back(&quot;457&quot;); <br/>	arr.push_back(&quot;278&quot;); <br/>	arr.push_back(&quot;55&quot;); <br/>	printLargest(arr); <br/>  <br/>  <br/>   return 0; <br/>} </code></pre> </div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="output" class="color-blue">Output</h2>
</div>
</div>
<div class="Output">
<div class="hddn">
<figure class="highlight" style="text-align: justify;">
<pre><code class="hljs" data-lang=""><span class="nt">5545727825</span></code></pre>
</figure>
</div>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/find-largest-number-from-set-of-given-numbers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>The operator when overloaded in a class ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/the-operator-when-overloaded-in-a-class/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/the-operator-when-overloaded-in-a-class/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 23:03:08 +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[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[compile time polymorphism in c++]]></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[oops concepts]]></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[polymorphism c++]]></category>
		<category><![CDATA[polymorphism c++ shapes]]></category>
		<category><![CDATA[polymorphism example]]></category>
		<category><![CDATA[polymorphism in c++]]></category>
		<category><![CDATA[polymorphism in c++ with example program]]></category>
		<category><![CDATA[polymorphism in oops]]></category>
		<category><![CDATA[polymorphism in oops with example in c++]]></category>
		<category><![CDATA[polymorphism programming]]></category>
		<category><![CDATA[polymorphism types]]></category>
		<category><![CDATA[polymorphism vs inheritance]]></category>
		<category><![CDATA[runtime polymorphism]]></category>
		<category><![CDATA[runtime polymorphism in c++]]></category>
		<category><![CDATA[Sapient Technical and HR Interview Questions]]></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[types of polymorphism]]></category>
		<category><![CDATA[types of polymorphism in c++]]></category>
		<category><![CDATA[types of polymorphism in oops]]></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=392</guid>

					<description><![CDATA[Answer : B. Ad-hoc polymorphism]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h3 id="the-operator-when-overloaded-in-a-class" class="color-pink" style="text-align: justify;">The operator when overloaded in a class ?</h3>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. Virtual polymorphism</p>
</div>
<div class="col-sm-6">
<p>B. Ad-hoc polymorphism</p>
</div>
<div class="col-sm-6">
<p>C. Transient polymorphism</p>
</div>
<div class="col-sm-6">
<p>D. Pseudo polymorphism</p>
</div>
</div>
<h3 id="answer-b-ad-hoc-polymorphism" style="text-align: justify;"><b>Answer : </b>B. Ad-hoc polymorphism</h3>
</div>
</div>
<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>Polymorphism means having many forms that in a single entity can takes more than one form.</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div><img fetchpriority="high" decoding="async" class="aligncenter size-medium" src="https://cdn.wikitechy.com/interview-questions/c++/polymorphism-in-cpp.jpg" alt="polymorphism in cpp" width="650" height="360" /></div>
<div class="hddn">The polymorphism classes are given below:</div>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li>
<ul>
<li style="text-align: justify;">Subtype polymorphism is also known as <b>runtime polymorphism</b></li>
<li style="text-align: justify;">Parametric polymorphism is also known as <b>compile-time polymorphism</b></li>
<li style="text-align: justify;">Ad-hoc polymorphism is also known as <b>overloading</b></li>
<li style="text-align: justify;">Coercion is also known as (implicit or explicit) <b>casting</b></li>
</ul>
</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/the-operator-when-overloaded-in-a-class/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Syntax for Pure Virtual Function is ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/syntax-for-pure-virtual-function-is/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/syntax-for-pure-virtual-function-is/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:58:10 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[abstract class in c++ with simple example]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[advantages of virtual function in c++]]></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[can pure virtual function]]></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[explain pure virtual function with example program]]></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 function]]></category>
		<category><![CDATA[pure virtual function c++]]></category>
		<category><![CDATA[pure virtual function in c++]]></category>
		<category><![CDATA[pure virtual function in c++ with example program]]></category>
		<category><![CDATA[Sapient Technical and HR Interview Questions]]></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[use of abstract class in c++]]></category>
		<category><![CDATA[use of pure virtual function in c++]]></category>
		<category><![CDATA[use of virtual function in c++]]></category>
		<category><![CDATA[virtual base class in c++]]></category>
		<category><![CDATA[virtual class c++]]></category>
		<category><![CDATA[virtual class in c++]]></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=388</guid>

					<description><![CDATA[Answer : D. void virtual show()=0]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h3 id="syntax-for-pure-virtual-function-is" class="color-pink" style="text-align: justify;">Syntax for Pure Virtual Function is ?</h3>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. virtual void show()==0</p>
</div>
<div class="col-sm-6">
<p>B. void virtual show()==0</p>
</div>
<div class="col-sm-6">
<p>C. virtual void show()=0</p>
</div>
<div class="col-sm-6">
<p>D. void virtual show()=0</p>
</div>
</div>
</div>
</div>
<h3 id="answer-b-virtual-void-show0" style="text-align: justify;"><b>Answer : </b>B. virtual void show()==0</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>In C++, A <a href="https://www.wikitechy.com/interview-questions/c-2/what-is-pure-virtual-function-in-cpp/">pure virtual function</a> or abstract function is a virtual function for which we don’t have implementation, we only declare it. A pure virtual function is declared by assigning 0 in declaration.</li>
</ul>
</div>
</div>
<div class="subheading" style="text-align: justify;">
<h2 id="syntax" class="color-green">Syntax</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">// An abstract class <br/>class Sample<br/>{    <br/>    // Data members of class <br/>public: <br/>    // Pure Virtual Function <br/>    virtual void show() = 0; <br/>    <br/>   /* Other members */<br/>};</code></pre> </div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/syntax-for-pure-virtual-function-is/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Find the wrong statement about Abstract Class ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/find-the-wrong-statement-about-abstract-class/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/find-the-wrong-statement-about-abstract-class/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:54:00 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[abstract class in 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++ abstract class]]></category>
		<category><![CDATA[c++ abstract class constructor]]></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[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[interface and abstract class in c++]]></category>
		<category><![CDATA[interface is partial abstract class true or false]]></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 class in c++]]></category>
		<category><![CDATA[pure virtual function in c++]]></category>
		<category><![CDATA[Sapient Technical and HR Interview Questions]]></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[use of abstract class in c++]]></category>
		<category><![CDATA[use of virtual function in c++]]></category>
		<category><![CDATA[uses of abstract class in c++]]></category>
		<category><![CDATA[virtual base class in c++]]></category>
		<category><![CDATA[virtual destructor in c++]]></category>
		<category><![CDATA[Virtual Function in C++]]></category>
		<category><![CDATA[we can declare abstract method outside of abstract class mcq]]></category>
		<category><![CDATA[we can declare abstract method outside of abstract class true or false]]></category>
		<category><![CDATA[which of the following is true about abstract classes]]></category>
		<category><![CDATA[which of the following is used to make an abstract class mcq]]></category>
		<category><![CDATA[which of the following statement is false about abstract classes]]></category>
		<category><![CDATA[which statement is incorrect with respect to abstract class]]></category>
		<category><![CDATA[which statement is incorrect with respect to abstract class in c++]]></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=386</guid>

					<description><![CDATA[Answer : B. We can’t create pointers to an abstract class]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h3 id="find-the-wrong-statement-about-abstract-class" class="color-pink" style="text-align: justify;">Find the wrong statement about Abstract Class ?</h3>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. We can’t create its objects</p>
</div>
<div class="col-sm-6">
<p>B. We can’t create pointers to an abstract class</p>
</div>
<div class="col-sm-6">
<p>C. It contains at least one pure virtual function</p>
</div>
<div class="col-sm-6">
<p>D. We can create references to an abstract class</p>
</div>
</div>
<h3 id="answer-b-we-cant-create-pointers-to-an-abstract-class" style="text-align: justify;"><b>Answer : </b>B. We can’t create pointers to an abstract class</h3>
</div>
</div>
<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>Abstract Class is a class which contains atleast one Pure Virtual function.</li>
<li>An abstract class is a class that is designed to be specifically used as a base class.</li>
<li>It is used to provide an Interface for its sub classes.</li>
<li>Classes inheriting an Abstract Class must provide definition to the pure virtual function, otherwise they will also become abstract class.</li>
<li>You declare a pure virtual function by using a <b>pure specifier (= 0)</b> in the declaration of a virtual member function in the class declaration.</li>
</ul>
</div>
</div>
<div class="subheading" style="text-align: justify;">
<h2 id="example" class="color-green">Example</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">class AB {<br/>public:<br/>  virtual void f() = 0;<br/>};</code></pre> </div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/find-the-wrong-statement-about-abstract-class/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>C++ supports run time polymorphism with the help of virtual functions, which is called ______ binding</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/c-supports-run-time-polymorphism-with-the-help-of-virtual-functions-which-is-called-______-binding/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/c-supports-run-time-polymorphism-with-the-help-of-virtual-functions-which-is-called-______-binding/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:49:38 +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[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[compile time polymorphism in c++]]></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 runtime polymorphism is achieved in c++]]></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[need of virtual function in c++]]></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[polymorphism and virtual function in c++]]></category>
		<category><![CDATA[polymorphism example]]></category>
		<category><![CDATA[polymorphism in c++ with example programpolymorphism in c++]]></category>
		<category><![CDATA[polymorphism programming]]></category>
		<category><![CDATA[polymorphism programmingcompile time polymorphism in c++]]></category>
		<category><![CDATA[pure virtual function in c++]]></category>
		<category><![CDATA[runtime polymorphism]]></category>
		<category><![CDATA[runtime polymorphism in c++]]></category>
		<category><![CDATA[runtime polymorphism is achieved by virtual function in c++]]></category>
		<category><![CDATA[Sapient Technical and HR Interview Questions]]></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[types of polymorphism in c++]]></category>
		<category><![CDATA[use of virtual function in c++]]></category>
		<category><![CDATA[Virtual Function in C++]]></category>
		<category><![CDATA[virtual function in c++ with example]]></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=384</guid>

					<description><![CDATA[Answer : A. Dynamic]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h3 id="c-supports-run-time-polymorphism-with-the-help-of-virtual-functions-which-is-called-______-binding" class="color-pink" style="text-align: justify;">C++ supports run time polymorphism with the help of virtual functions, which is called ______ binding.</h3>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. Dynamic</p>
</div>
<div class="col-sm-6">
<p>B. Run time</p>
</div>
<div class="col-sm-6">
<p>C. Early binding</p>
</div>
<div class="col-sm-6">
<p>D. Static</p>
</div>
</div>
<h3 id="answer-a-dynamic" style="text-align: justify;"><b>Answer : </b>A. Dynamic</h3>
</div>
</div>
<div class="subheading" style="text-align: justify;">
<h2 id="explanation">Explanation :</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li style="text-align: justify;">Dynamic binding (dynamic dispatch) means that a block of code executed with reference to a procedure call is determined at run time.</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/c-supports-run-time-polymorphism-with-the-help-of-virtual-functions-which-is-called-______-binding/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>A virtual function that has no definition within the base class is called ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/a-virtual-function-that-has-no-definition-within-the-base-class-is-called/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/a-virtual-function-that-has-no-definition-within-the-base-class-is-called/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:45:35 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[abstract class in c++ with simple example]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[advantages of virtual function in c++]]></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 function = 0]]></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[explain pure virtual function with example program]]></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[interview questions on virtual functions in c++]]></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[need of virtual function in c++]]></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 function]]></category>
		<category><![CDATA[pure virtual function c++ example]]></category>
		<category><![CDATA[pure virtual function call]]></category>
		<category><![CDATA[pure virtual function in c++]]></category>
		<category><![CDATA[pure virtual function in c++ with example program]]></category>
		<category><![CDATA[Sapient Technical and HR Interview Questions]]></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[use of pure virtual function in c++]]></category>
		<category><![CDATA[use of virtual function in c++]]></category>
		<category><![CDATA[virtual and pure virtual function]]></category>
		<category><![CDATA[virtual class in c++]]></category>
		<category><![CDATA[virtual function]]></category>
		<category><![CDATA[virtual function and pure virtual function]]></category>
		<category><![CDATA[Virtual Function in C++]]></category>
		<category><![CDATA[virtual function in c++ with example]]></category>
		<category><![CDATA[What is a virtual class]]></category>
		<category><![CDATA[What is a virtual class in C++]]></category>
		<category><![CDATA[What is virtual function in C]]></category>
		<category><![CDATA[why we need pure virtual function in c++]]></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=380</guid>

					<description><![CDATA[Answer : A. Pure virtual function]]></description>
										<content:encoded><![CDATA[<h3 id="a-virtual-function-that-has-no-definition-within-the-base-class-is-called" class="color-pink" style="text-align: justify;">A virtual function that has no definition within the base class is called ?</h3>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. Pure virtual function</p>
</div>
<div class="col-sm-6">
<p>B. Pure static function</p>
</div>
<div class="col-sm-6">
<p>C. Pure Const function</p>
</div>
<div class="col-sm-6">
<p>D. Virtual Function</p>
</div>
</div>
<p style="text-align: justify;"><b>Answer : </b>A. <a href="https://www.wikitechy.com/interview-questions/cpp/what-is-pure-virtual-function-in-cpp/" target="_blank" rel="noopener">Pure virtual function</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/a-virtual-function-that-has-no-definition-within-the-base-class-is-called/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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>
		<item>
		<title>Which of the following concepts means wrapping up of data and functions together ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-concepts-means-wrapping-up-of-data-and-functions-together/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-concepts-means-wrapping-up-of-data-and-functions-together/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:36:01 +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[basic concepts of oops]]></category>
		<category><![CDATA[Basic OOPS and C++ MCQ]]></category>
		<category><![CDATA[BMC Software interview questions and answers]]></category>
		<category><![CDATA[Bosch India Software interview questions and answers]]></category>
		<category><![CDATA[C++ Programming Questions]]></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[explain oops concepts with examples]]></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[object oriented programming c++]]></category>
		<category><![CDATA[oop concepts with examples]]></category>
		<category><![CDATA[oops class c++]]></category>
		<category><![CDATA[oops concepts]]></category>
		<category><![CDATA[OOPS Concepts C++ Programming Questions and Answers]]></category>
		<category><![CDATA[oops concepts in c++]]></category>
		<category><![CDATA[oops concepts in c++ with real time examples]]></category>
		<category><![CDATA[oops concepts in c++ with realtime examples]]></category>
		<category><![CDATA[OOPS Concepts in Java with Examples]]></category>
		<category><![CDATA[oops concepts interview questions]]></category>
		<category><![CDATA[oops concepts with examples]]></category>
		<category><![CDATA[oops interview questions]]></category>
		<category><![CDATA[oops interview questions and answers]]></category>
		<category><![CDATA[oops interview questions c++]]></category>
		<category><![CDATA[oops tricky interview question]]></category>
		<category><![CDATA[oops tricky interview questions]]></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[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[Which of the following concepts means wrapping up of data]]></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=376</guid>

					<description><![CDATA[Answer : B. Encapsulation
]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h3 id="which-of-the-following-concepts-means-wrapping-up-of-data-and-functions-together" class="color-pink" style="text-align: justify;">Which of the following concepts means wrapping up of data and functions together ?</h3>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. Abstraction</p>
</div>
<div class="col-sm-6">
<p>B. Encapsulation</p>
</div>
<div class="col-sm-6">
<p>C. Inheritance</p>
</div>
<div class="col-sm-6">
<p>D. None</p>
</div>
</div>
</div>
</div>
<p style="text-align: justify;"><b>Answer : </b>B. <a href="https://www.wikitechy.com/interview-questions/cpp/what-are-the-oops-concepts/" target="_blank" rel="noopener">Encapsulation</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-concepts-means-wrapping-up-of-data-and-functions-together/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Which of the following can access private data members or member functions of a class ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-can-access-private-data-members-or-member-functions-of-a-class/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-can-access-private-data-members-or-member-functions-of-a-class/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:32:20 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[accessing class members in c++]]></category>
		<category><![CDATA[Accessing private members of C++ classes]]></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++ How does a function access private data member of a class]]></category>
		<category><![CDATA[Can friend functions access private members]]></category>
		<category><![CDATA[Can member functions access private variables]]></category>
		<category><![CDATA[Can objects access private members in C++]]></category>
		<category><![CDATA[Can we access private members without using its object]]></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 can we access private member (functions) of class]]></category>
		<category><![CDATA[how to access private data members of a class in c++]]></category>
		<category><![CDATA[How to access private data members outside the class]]></category>
		<category><![CDATA[How to access private data members outside the class without]]></category>
		<category><![CDATA[how to access private member function of a class in c++]]></category>
		<category><![CDATA[how to access private member variables of a class in c++]]></category>
		<category><![CDATA[How to access private variables from another class]]></category>
		<category><![CDATA[how to call private member function of a class in c++ program]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[Is it possible to access data members outside a class]]></category>
		<category><![CDATA[is there any way to access class private members without its object]]></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[private member function in c++ with example]]></category>
		<category><![CDATA[Sapient Technical and HR Interview Questions]]></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[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=374</guid>

					<description><![CDATA[Answer : C. Any member function of that class.]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h3 id="which-of-the-following-can-access-private-data-members-or-member-functions-of-a-class" class="color-pink" style="text-align: justify;">Which of the following can access private data members or member functions of a class ?</h3>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. Any function in the program.</p>
</div>
<div class="col-sm-6">
<p>B. All global functions in the program.</p>
</div>
<div class="col-sm-6">
<p>C. Any member function of that class.</p>
</div>
<div class="col-sm-6">
<p>D. Only public member functions of that class.</p>
</div>
</div>
</div>
</div>
<h3 id="answer-c-any-member-function-of-that-class" style="text-align: justify;"><b>Answer : </b>C. Any member function of that class.</h3>
<div class="subheading" style="text-align: justify;">
<h2 id="explanation">Explanation :</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li style="text-align: justify;">Accessing a data member depends only on the access control of that data member. If its public, then the data member can be easily accessed using the direct member access (.) operator with the object of that class.</li>
<li style="text-align: justify;">If, the data member is defined as private or protected, then we cannot access the data variables directly. Then we will have to create special public member functions to access, use or initialize the private and protected data members.</li>
<li style="text-align: justify;">These member functions are also called Accessors and Mutator methods or getter and setter functions.</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-can-access-private-data-members-or-member-functions-of-a-class/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Which of the following access specifiers is used in a class definition by default ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-access-specifiers-is-used-in-a-class-definition-by-default/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-access-specifiers-is-used-in-a-class-definition-by-default/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:28:07 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[access specifier in c++]]></category>
		<category><![CDATA[access specifiers in c++ inheritance]]></category>
		<category><![CDATA[access specifiers in c++ with example programaccess specifiers in c++]]></category>
		<category><![CDATA[access specifiers in c++ with examples]]></category>
		<category><![CDATA[access specifiers in oops with example]]></category>
		<category><![CDATA[access specifiers is used in a class definition by default in c++]]></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++ protected inheritance]]></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[default access specifier in c++]]></category>
		<category><![CDATA[default access specifiers in c++]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[difference between public private and protected in c++ with example]]></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[private member function in c++ with example]]></category>
		<category><![CDATA[protected in c++ with example]]></category>
		<category><![CDATA[public private protected c++]]></category>
		<category><![CDATA[public private protected inheritance in c++]]></category>
		<category><![CDATA[Sapient Technical and HR Interview Questions]]></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[what is correct about the static data member of a class?]]></category>
		<category><![CDATA[which access specifier is implicitly used in a class]]></category>
		<category><![CDATA[which access specifiers is used in a class definition by default]]></category>
		<category><![CDATA[which of the following provides a reuse mechanism?]]></category>
		<category><![CDATA[which of these is a function defined in a 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=372</guid>

					<description><![CDATA[Answer : C. Private]]></description>
										<content:encoded><![CDATA[<div class="row">
<div class="col-sm-12">
<div class="TextHeading">
<div class="hddn">
<h4 id="which-of-the-following-access-specifiers-is-used-in-a-class-definition-by-default" class="color-pink" style="text-align: justify;">Which of the following access specifiers is used in a class definition by default ?</h4>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. Protected</p>
</div>
<div class="col-sm-6">
<p>B. Public</p>
</div>
<div class="col-sm-6">
<p>C. Private</p>
</div>
<div class="col-sm-6">
<p>D. Friend</p>
</div>
</div>
</div>
</div>
<h3 id="answer-c-private" style="text-align: justify;"><b>Answer : </b>C. Private</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><b>Public</b> &#8211; The members declared as Public are accessible from outside the Class through an object of the class.</li>
<li><b>Protected</b> &#8211; The members declared as Protected are accessible from outside the class but only in a class derived from it.</li>
<li><b>Private</b> &#8211; These members are only accessible from within the class. No outside Access is allowed.</li>
<li><b>Friend</b> &#8211; A friend function of a class is defined outside that class scope but it has the right to access all private and protected members of the class.</li>
</ul>
</div>
</div>
<div class="text-center row" style="text-align: justify;"></div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-access-specifiers-is-used-in-a-class-definition-by-default/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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>
		<item>
		<title>State whether the following statements about inheritance are True or False.</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/state-whether-the-following-statements-about-inheritance-are-true-or-false/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/state-whether-the-following-statements-about-inheritance-are-true-or-false/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:19:30 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[an object of a derived class cannot access private members of base class]]></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# inheritance intermcq on inheritance in c++]]></category>
		<category><![CDATA[c++ inheritance practice questions]]></category>
		<category><![CDATA[c++ programming exercises inheritance]]></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[in oop]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[inheritance and polymorphism quiz]]></category>
		<category><![CDATA[inheritance in c++ questions and answers]]></category>
		<category><![CDATA[inheritance in c++ with example program]]></category>
		<category><![CDATA[inheritance mcq in java]]></category>
		<category><![CDATA[inheritance output questions in c++]]></category>
		<category><![CDATA[inheritance questions and answers]]></category>
		<category><![CDATA[interview questions on inheritance in c++]]></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[mcq on inheritance in c++ with answers]]></category>
		<category><![CDATA[mcq on virtual function in c++]]></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[practical questions on inheritance in c++]]></category>
		<category><![CDATA[programming exercises on inheritance]]></category>
		<category><![CDATA[programming questions on inheritance in c++]]></category>
		<category><![CDATA[programs on inheritance in c++]]></category>
		<category><![CDATA[questions on inheritance in c++]]></category>
		<category><![CDATA[Sapient Technical and HR Interview Questions]]></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[types of inheritance in c++]]></category>
		<category><![CDATA[which of the following is not a type of inheritance?]]></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=368</guid>

					<description><![CDATA[Answer : C. True, True]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<p class="color-pink" style="text-align: justify;">State whether the following statements about inheritance are True or False.<br />
<b>I .</b> A public member of a class can be accessed by its own objects using the dot operator.<br />
<b>II .</b> While inheriting, the private members of the base class will never become the members of its derived class.</p>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. True, False</p>
</div>
<div class="col-sm-6">
<p>B. False, True</p>
</div>
<div class="col-sm-6">
<p>C. True, True</p>
</div>
<div class="col-sm-6">
<p>D. False, False</p>
</div>
</div>
</div>
</div>
<h3 id="answer-c-true-true" style="text-align: justify;"><b>Answer : </b>C. True, True</h3>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/state-whether-the-following-statements-about-inheritance-are-true-or-false/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>In c++ how are protected members of a base class accessed in derived class when inherited privately ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/in-cpp-how-are-protected-members-of-a-base-class-accessed-in-derived-class-when-inherited-privately/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/in-cpp-how-are-protected-members-of-a-base-class-accessed-in-derived-class-when-inherited-privately/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:15:34 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[++ - Accessing protected members in a derived class]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[access specifiers in c++ inheritance]]></category>
		<category><![CDATA[access specifiers in c++ inheritancec]]></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++ - Accessing protected members in a derived class]]></category>
		<category><![CDATA[c++ - why does the derived class inherit the private members]]></category>
		<category><![CDATA[c++ - why does the derived class inherit the private members of]]></category>
		<category><![CDATA[c++ Does protected inheritance allow the derived class access]]></category>
		<category><![CDATA[c++ protected inheritance]]></category>
		<category><![CDATA[Can derived class access private members of base class]]></category>
		<category><![CDATA[Can protected members be accessed by objects?]]></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[derived class c++]]></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 to access protected members in a derived class]]></category>
		<category><![CDATA[how to access protected members in c++]]></category>
		<category><![CDATA[If a base class member access is public and an inherited 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[Most Asked Sapient Nitro Interview Questions]]></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[protected in c++ with example]]></category>
		<category><![CDATA[Protected members]]></category>
		<category><![CDATA[protected members inheritance in c++]]></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[What are the use cases of protected and private inheritance]]></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=366</guid>

					<description><![CDATA[Answer : A. Privately]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h4 id="in-c-how-are-protected-members-of-a-base-class-accessed-in-derived-class-when-inherited-privately" class="color-pink" style="text-align: justify;">In c++ how are protected members of a base class accessed in derived class when inherited privately ?</h4>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. Privately</p>
</div>
<div class="col-sm-6">
<p>B. Publicly</p>
</div>
<div class="col-sm-6">
<p>C. Protectedly</p>
</div>
<div class="col-sm-6">
<p>D. Not Inherited</p>
</div>
</div>
</div>
</div>
<h3 id="answer-a-privately" style="text-align: justify;"><b>Answer : </b>A. Privately</h3>
<div class="subheading" style="text-align: justify;">
<h2 id="explanation">Explanation:</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li style="text-align: justify;">Derived classes can access protected and public members of it&#8217;s base class, and the derived class can not access the private members of it&#8217;s base class.</li>
<li>The private members are inherited for the following reason :
<ul>
<li style="text-align: justify;">The base class can define a protected or public function that modifies the base class&#8217;s private member.</li>
</ul>
</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/in-cpp-how-are-protected-members-of-a-base-class-accessed-in-derived-class-when-inherited-privately/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Encapsulation is ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/encapsulation-is/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/encapsulation-is/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:10:59 +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[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[data encapsulation]]></category>
		<category><![CDATA[Data Encapsulation in C++]]></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[Encapsulation Definition]]></category>
		<category><![CDATA[encapsulation example]]></category>
		<category><![CDATA[Encapsulation in C++]]></category>
		<category><![CDATA[encapsulation in java]]></category>
		<category><![CDATA[encapsulation in networking]]></category>
		<category><![CDATA[encapsulation in oops]]></category>
		<category><![CDATA[encapsulation in oops with example]]></category>
		<category><![CDATA[encapsulation java]]></category>
		<category><![CDATA[encapsulation python]]></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[Most Asked Sapient Nitro Interview Questions]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[NetApp interview questions and answers]]></category>
		<category><![CDATA[OOP Concept What is Encapsulation]]></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[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[What do you mean by encapsulation]]></category>
		<category><![CDATA[What is a encapsulation in Java]]></category>
		<category><![CDATA[What is encapsulation]]></category>
		<category><![CDATA[What is encapsulation in object oriented]]></category>
		<category><![CDATA[What is encapsulation in simple terms]]></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=364</guid>

					<description><![CDATA[Answer : C. Reduce Complexity]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h4 id="encapsulation-is" class="color-pink" style="text-align: justify;">Encapsulation is ?</h4>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. Binding code and data together</p>
</div>
<div class="col-sm-6">
<p>B. Using single interface for general class of actions.</p>
</div>
<div class="col-sm-6">
<p>C. Reduce Complexity</p>
</div>
<div class="col-sm-6">
<p>D. All the above</p>
</div>
</div>
</div>
</div>
<h3 id="answer-c-reduce-complexity" style="text-align: justify;"><b>Answer : </b>C. Reduce Complexity</h3>
<div class="subheading" style="text-align: justify;">
<h2 id="explanation">Explanation :</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li style="text-align: justify;"><a href="https://www.wikitechy.com/interview-questions/cpp/what-are-the-oops-concepts/" target="_blank" rel="noopener">Encapsulation</a> is a mechanism that puts the data and function together.</li>
<li style="text-align: justify;">It is the result of hiding implementation details of an object from its user.</li>
<li style="text-align: justify;">The object hides its data to de accessed by only those functions which are packed in the class of that object.</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/encapsulation-is/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Which of the following concepts of OOPS means exposing only necessary information to client ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-concepts-of-oops-means-exposing-only-necessary-information-to-client/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-concepts-of-oops-means-exposing-only-necessary-information-to-client/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 22:07:18 +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[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[data hiding]]></category>
		<category><![CDATA[data hiding and abstraction]]></category>
		<category><![CDATA[data hiding and encapsulation]]></category>
		<category><![CDATA[Data Hiding C++]]></category>
		<category><![CDATA[Data Hiding C++data hiding example in java]]></category>
		<category><![CDATA[data hiding in c++]]></category>
		<category><![CDATA[data hiding in javad]]></category>
		<category><![CDATA[data hiding in oops]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[difference between data hiding and encapsulation]]></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[ifference between data hiding and encapsulation]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[Is data hiding and encapsulation same]]></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[Most Asked Sapient Nitro Interview Questions]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[NetApp interview questions and answers]]></category>
		<category><![CDATA[OOPS Concepts C++ Programming Questions]]></category>
		<category><![CDATA[OOPS Concepts C++ Programming Questions and Answers]]></category>
		<category><![CDATA[OOPS Concepts C++ Programming Questions and Answerswhat is class how does it accomplish data hiding explain with example]]></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[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[what is data hiding]]></category>
		<category><![CDATA[What is data hiding and data abstraction]]></category>
		<category><![CDATA[What is data hiding with example]]></category>
		<category><![CDATA[What is information hiding in OOP]]></category>
		<category><![CDATA[Which of the following concepts of OOPS]]></category>
		<category><![CDATA[Which of the following concepts of OOPS means exposing]]></category>
		<category><![CDATA[Which of the following concepts of OOPS means exposing only]]></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=362</guid>

					<description><![CDATA[Answer : C. Data Hiding]]></description>
										<content:encoded><![CDATA[<h4 id="which-of-the-following-concepts-of-oops-means-exposing-only-necessary-information-to-client" class="color-pink" style="text-align: justify;">Which of the following concepts of OOPS means exposing only necessary information to client ?</h4>
<div class="row" style="text-align: justify;">
<div class="col-sm-6">
<p>A. Abstraction</p>
</div>
<div class="col-sm-6">
<p>B. Encapsulation</p>
</div>
<div class="col-sm-6">
<p>C. Data hiding</p>
</div>
<div class="col-sm-6">
<p>D. Data binding</p>
</div>
</div>
<h3 id="answer-c-data-hiding" style="text-align: justify;"><b>Answer : </b>C. Data hiding</h3>
<div class="subheading" style="text-align: justify;">
<h2 id="explanation">Explanation :</h2>
</div>
<div class="subheading" style="text-align: justify;">
<h2 id="data-hiding" class="color-green">Data hiding:</h2>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Data hiding is hiding the details of internal data members of an object. Data hiding is also known as Information hiding.</li>
</ul>
</div>
</div>
<div class="subheading" style="text-align: justify;">
<h2 id="abstraction" class="color-green">Abstraction:</h2>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>It can be defined as the separation of unnecessary details or explanation from system requirements so as to reduce the complexities of understanding requirements.</li>
</ul>
</div>
</div>
<div class="text-center row" style="text-align: justify;"></div>
<div class="subheading" style="text-align: justify;">
<h2 id="encapsulation" class="color-green">Encapsulation:</h2>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>It is a mechanism that puts the data and function together. It is the result of hiding implementation details of an object from its user.The object hides its data to de accessed by only those functions which are packed in the class of that object.</li>
</ul>
</div>
</div>
<div class="subheading" style="text-align: justify;">
<h2 id="dynamic-binding" class="color-green">Dynamic Binding:</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li style="text-align: justify;">Dynamic binding is the process of resolving the function to be associated with the respective functions calls during their runtime rather than compile time.</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/which-of-the-following-concepts-of-oops-means-exposing-only-necessary-information-to-client/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
