<?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>c programming examples - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/c-programming-examples/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/c-programming-examples/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Thu, 18 Aug 2022 10:21:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>c programming examples - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/c-programming-examples/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What is C++ ?</title>
		<link>https://www.wikitechy.com/interview-questions/cpp/what-is-cpp/</link>
					<comments>https://www.wikitechy.com/interview-questions/cpp/what-is-cpp/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Thu, 18 Aug 2022 10:21:17 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[basics concepts of c++ programming language]]></category>
		<category><![CDATA[c programming examples]]></category>
		<category><![CDATA[c++ basics]]></category>
		<category><![CDATA[c++ Introduction]]></category>
		<category><![CDATA[c++ tutorial]]></category>
		<category><![CDATA[introduction to c++ programming language]]></category>
		<category><![CDATA[learn c programming]]></category>
		<category><![CDATA[learn c++]]></category>
		<category><![CDATA[what is c++]]></category>
		<category><![CDATA[what is c++ used for]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4763</guid>

					<description><![CDATA[It is an object-oriented programming language that can be used to create high-performance applications. In 1985 C++ was developed by Bjarne Stroustrup as an extension of c program language. It gives a programmer’s high level of control over system memory and resources. This programming language is one of the world’s most popular language. Nowadays it can be [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">It is an object-oriented programming language that can be used to create high-performance applications.</li>
<li style="text-align: justify;">In 1985 <a href="https://www.wikitechy.com/tutorials/c++/">C++</a> was developed by Bjarne Stroustrup as an extension of c program language.</li>
<li style="text-align: justify;">It gives a programmer’s high level of control over system memory and resources.</li>
<li style="text-align: justify;">This programming language is one of the world’s most popular language.</li>
<li style="text-align: justify;">Nowadays it can be found in embedded systems, operating systems and Graphical User Interfaces.</li>
</ul>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4764 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-cpp.png" alt="" width="1139" height="502" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-cpp.png 1139w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-cpp-300x132.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-cpp-1024x451.png 1024w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-cpp-768x338.png 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-cpp-390x172.png 390w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/what-is-cpp-820x361.png 820w" sizes="(max-width: 1139px) 100vw, 1139px" /></p>
<ul style="text-align: justify;">
<li>C++ gives a clear structure to programs and allows code to be reused, lowering development costs because it is an Object-Oriented Programming language.</li>
<li>C++ is close to Java and C#, it makes easy for programmers to switch vice versa or C++.</li>
<li>It is used to develop browsers, games, operating systems and so on.</li>
</ul>
<h2 id="sample-code" style="text-align: justify;">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/>int main() <br/>{<br/>  cout &lt;&lt; &quot;Welcome to Wikitechy&quot;;<br/>  return 0;<br/>}</code></pre> </div>
<h2 id="output" style="text-align: justify;">Output</h2>
<p style="text-align: justify;"><img decoding="async" class="alignnone size-full wp-image-4765 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/cpp.png" alt="" width="1227" height="347" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/cpp.png 1227w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/cpp-300x85.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/cpp-1024x290.png 1024w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/cpp-768x217.png 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/cpp-390x110.png 390w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/cpp-820x232.png 820w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/08/cpp-1180x334.png 1180w" sizes="(max-width: 1227px) 100vw, 1227px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/cpp/what-is-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>What is the Output ?</title>
		<link>https://www.wikitechy.com/interview-questions/c/what-is-the-output/</link>
					<comments>https://www.wikitechy.com/interview-questions/c/what-is-the-output/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Mon, 12 Jul 2021 20:01:05 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Accentur interview questions and answers]]></category>
		<category><![CDATA[Applied Materials interview questions and answers]]></category>
		<category><![CDATA[Asian Paints Ltd. interview questions and answers]]></category>
		<category><![CDATA[basic c programs]]></category>
		<category><![CDATA[basics of c]]></category>
		<category><![CDATA[Bosch India Software interview questions and answers]]></category>
		<category><![CDATA[c c++ programs for interview]]></category>
		<category><![CDATA[c code]]></category>
		<category><![CDATA[c coding questions]]></category>
		<category><![CDATA[c interview questions]]></category>
		<category><![CDATA[c language]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[c programming basics]]></category>
		<category><![CDATA[c programming coding questions]]></category>
		<category><![CDATA[c programming examples]]></category>
		<category><![CDATA[c programming language]]></category>
		<category><![CDATA[c programming test questions]]></category>
		<category><![CDATA[c programming tricky questions]]></category>
		<category><![CDATA[c programming tutorial]]></category>
		<category><![CDATA[c programs with solutions]]></category>
		<category><![CDATA[c_language]]></category>
		<category><![CDATA[Capgemini interview questions and answers]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[CGI Group Inc interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Ciena Corporation interview questions and answers]]></category>
		<category><![CDATA[Collabera Technologies interview questions and answers]]></category>
		<category><![CDATA[computer programming]]></category>
		<category><![CDATA[cracking the coding interview]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[DHFL Pramerica Life Insurance Company Ltd interview questions and answers]]></category>
		<category><![CDATA[Elico HealthCare Services Ltd interview questions and answers]]></category>
		<category><![CDATA[examples of output devices]]></category>
		<category><![CDATA[factorial program in c]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[HCL Technol interview questions and answers]]></category>
		<category><![CDATA[IBM interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[learn c programming]]></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[output definition computer]]></category>
		<category><![CDATA[output devices of computer and their functions]]></category>
		<category><![CDATA[pattern programs asked in interview]]></category>
		<category><![CDATA[PeopleStrong interview questions and answers]]></category>
		<category><![CDATA[pointers in c]]></category>
		<category><![CDATA[programs asked in interview in java]]></category>
		<category><![CDATA[R Systems interview questions and answers]]></category>
		<category><![CDATA[Raqmiyat Information Technologies Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Reliance Industries Ltd interview questions and answers]]></category>
		<category><![CDATA[SAP Labs India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[strings in c]]></category>
		<category><![CDATA[Tata AIA Life Insurance interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindr interview questions and answers]]></category>
		<category><![CDATA[the c programming language]]></category>
		<category><![CDATA[The Linde Group interview questions and answers]]></category>
		<category><![CDATA[what is output in computer]]></category>
		<category><![CDATA[zycus infotech interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=315</guid>

					<description><![CDATA[Answer : NULL...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="what-is-the-output" class="color-pink" style="text-align: justify;">What is the Output ?</h2>
</div>
</div>
<div class="CodeContent" style="text-align: justify;">
<div class="hddn">
<figure class="highlight"><div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-c code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-c code-embed-code">main () <br/>  {<br/>  char *p1=&quot;Name&quot;; <br/>  char *p2; <br/>  p2=(char *)malloc(20); <br/>  while(*p2++=*p1++); <br/>  printf(&quot;%s\n&quot;,p2); <br/>  } </code></pre> </div></figure>
</div>
</div>
<p style="text-align: justify;"><b>Answer</b> : NULL</p>
<div class="Content">
<div class="hddn">
<ul>
<li style="text-align: justify;">We are incrementing the pointers p1,p2.</li>
<li style="text-align: justify;">When it reached the end of the string, *p2 points to NULL.</li>
<li style="text-align: justify;">We have lost the address of the starting position.</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/c/what-is-the-output/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
