<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-1814470455851890006</atom:id><lastBuildDate>Tue, 18 Mar 2014 03:19:46 +0000</lastBuildDate><category>c++</category><category>Thread</category><title>Technical stuff</title><description></description><link>http://avinashpatna.blogspot.com/</link><managingEditor>noreply@blogger.com (Avinash Kumar)</managingEditor><generator>Blogger</generator><openSearch:totalResults>97</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-1598316328814963422</guid><pubDate>Mon, 15 Jul 2013 03:57:00 +0000</pubDate><atom:updated>2013-07-14T20:57:58.227-07:00</atom:updated><title>what is purpose of inheritance </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;the basic purpose of inheritance is to extend the capability of an entity by inheriting from an existing entity It works the same way as in the&amp;nbsp; real world scenario; children inherit the features from their parents&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/what-is-purpose-of-inheritance.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-6977244163912147188</guid><pubDate>Sun, 14 Jul 2013 03:30:00 +0000</pubDate><atom:updated>2013-07-13T20:30:57.529-07:00</atom:updated><title>difference between classes and object </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In the simplest terms&amp;nbsp; in int i, int is class and i is an object of that class. From the int class we can create several objects(variables). The int class indicates what kind of data an object of its type can hold and what operations(adition, subtration, etc) can be performed on this data . Aclass is thus a description of number of similar objects. it specifies what data and&amp;nbsp; what functions will be included in objects&amp;nbsp; of that class.&lt;br /&gt;Instead of standard class like int you can think of user defined class like employee from which object like , e1, e2, e3 can be created through a statement .&lt;br /&gt;&lt;br /&gt;employee e1, e2, e3;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/difference-between-classes-and-object.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-2264674437989818180</guid><pubDate>Sat, 13 Jul 2013 07:07:00 +0000</pubDate><atom:updated>2013-07-13T00:07:12.927-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">c++</category><title>difference betwen classes and objects  in layman&#39;s lterms</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;A class is a blueprint for objects. From one class several objects can be created Each object is known as an&amp;nbsp; instance of a particular class. for example, &#39;cricketers&#39; is a class, wheres, &#39;player name&#39;&amp;nbsp; is specific instance of the cricketers class describes (hence they are objects).The blueprint for Cricketers class describes&amp;nbsp; how a cricketer would look like(coloured/white clothing, cap etc)and what operations can he perform(bat, bowl, field, etc)similarly, you can imagine &#39;Musicians&#39; as a class and &#39;Lata&#39; and &#39;Asha&#39; as specific instances of this class. Again&amp;nbsp; from one class of musicians several instances(objects) can be created.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/difference-betwen-classes-and-objects.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-1567492067692532966</guid><pubDate>Fri, 12 Jul 2013 09:21:00 +0000</pubDate><atom:updated>2013-07-12T02:21:10.607-07:00</atom:updated><title>difference betyween an object based language and object oriented language </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Languages that support only objects and classes are&amp;nbsp; called object based languages.&lt;br /&gt;Languages do not&amp;nbsp; support features like inheritance and polymorphism.They merely let you create objects and call methods using these objects .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/difference-betyween-object-based.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-6032658957493898635</guid><pubDate>Fri, 12 Jul 2013 09:17:00 +0000</pubDate><atom:updated>2013-07-12T02:17:08.794-07:00</atom:updated><title>what is polymorphism | poymorphism in c++</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;polymorphism means the ability to assume several&amp;nbsp; forms . in object oriented programming context this refers&amp;nbsp; to the ability of an entity to&amp;nbsp; refer to objects of various classes at runtime .&lt;br /&gt;&lt;br /&gt;c++ has three mechanisms that helps us to implement polymorphism&lt;br /&gt;these are&lt;br /&gt;1: function overloading&lt;br /&gt;2: operator overloading&lt;br /&gt;virtual function&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/what-is-polymorphism-poymorphism-in-c.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-8088753869892898357</guid><pubDate>Wed, 10 Jul 2013 03:29:00 +0000</pubDate><atom:updated>2013-07-09T20:29:27.687-07:00</atom:updated><title>what are three parts of an iostream system</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;the three parts of an iostream system are as follows&lt;br /&gt;A buffer , which acts an intermediary&amp;nbsp; between generalized input-output system and some of the particular source or sink of characters. this has been implemented in the streambuf&lt;br /&gt;class.&lt;br /&gt;&lt;br /&gt;A specification system responsible for reporting errors and controlling formats. this has been implemented in the ios class.&lt;br /&gt;A translation system that converts c++ language&#39;s typed objects to a sequence of characters or vice versa . this has been implemented in classes like istream, ostream, iostream. &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/what-are-three-parts-of-iostream-system_9.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-6993767919913087253</guid><pubDate>Mon, 08 Jul 2013 12:34:00 +0000</pubDate><atom:updated>2013-07-08T05:34:59.205-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">c++</category><title>why nested comments are not allowed </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;consider the following example&lt;br /&gt;/*this is comment /* Nested comments */ are not allowed */&lt;br /&gt;Anything that lies between /* and&amp;nbsp; */ is treated as a comment . In the above example from&amp;nbsp; &quot;This &quot; up to comments&quot; everything is treated as comment including &quot;/*&quot;, Hencve &quot;are not allowed. */&quot; does not lie in the comment. this being an improper c statement&amp;nbsp; error occurs.&lt;br /&gt;&amp;nbsp;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/why-nested-comments-are-not-allowed.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-4101534752511309547</guid><pubDate>Mon, 08 Jul 2013 12:26:00 +0000</pubDate><atom:updated>2013-07-08T05:26:46.565-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">c++</category><title>when should the function decalrations be made global?</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;The function declaration should be made global when the&amp;nbsp; function being declated is called from more than one function &lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/when-should-function-decalrations-be.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-5404434505865613091</guid><pubDate>Mon, 08 Jul 2013 11:56:00 +0000</pubDate><atom:updated>2013-07-08T05:08:30.696-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">c++</category><title>what is advantage of c++ over  structures language | what is advantage of c++ </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;we know memory is always at the premium . In block structured&amp;nbsp; programming we can save memory by controlling the life of variables.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for example , consider the following function &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void fun()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 120 statements&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int a;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; //statement using a;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 100 more statements;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;here a has been defined inside a bloack as it is not needed once the control passes the blocl . As soon as the control outside the block a dies thereby freeing the memory occupied by it.had a been defined at the beginning of the function.&amp;nbsp; a would have survived till execution of the function had not come to an end;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/test_8.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-4256497748683872339</guid><pubDate>Mon, 08 Jul 2013 11:53:00 +0000</pubDate><atom:updated>2013-07-08T04:53:29.692-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">c++</category><title>c++</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;this is an example of object oriented programmng&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/c.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-5416733533295632276</guid><pubDate>Mon, 08 Jul 2013 11:44:00 +0000</pubDate><atom:updated>2013-07-08T04:44:10.158-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Thread</category><title>Thread </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;this is an example of thread .&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/thread.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-1408643408481910507</guid><pubDate>Mon, 08 Jul 2013 11:15:00 +0000</pubDate><atom:updated>2013-07-08T04:15:18.920-07:00</atom:updated><title>what are the disadvantages of using printf | disadvantages of using printf</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;There are 5 major disadvantages of printf&lt;br /&gt;1: Remembering all the format specifiers in printf is not an easy job.&lt;br /&gt;2: printf don&#39;t carryout conversion logically&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; example :- 3.7 printed using&amp;nbsp; %d&amp;nbsp; produces 3 but&amp;nbsp; it should produce&amp;nbsp; 4&lt;br /&gt;3: in case of a mismatch between the specifiers and the type to be printed , the printf functions do not repeat any warning&lt;br /&gt;4: we can not extend printf to accomodate new data type thus the primary goal of c++, the ability to add new with ease , get dereated&lt;br /&gt;5: printf are variable argument list functions&amp;nbsp; an interpreteter is loaded for such functions at runtime, this increased overheads, because, even if we print only a character, logic that prints out long, double , sitll gets loaded&amp;nbsp; this leads to wastage or memory space. &lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/what-are-disadvantages-of-using-printf.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-8512779309105676909</guid><pubDate>Mon, 08 Jul 2013 10:53:00 +0000</pubDate><atom:updated>2013-07-08T03:53:26.470-07:00</atom:updated><title>what is stream </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;stream is a general name given to the flow of data&amp;nbsp; to represent different kinds of data different streams are used . For example , the standard output stream&amp;nbsp; flows to the screen display, the standard&amp;nbsp; input stream flows from the keyboard&amp;nbsp; in c++, a stream is represented by an object of particular clsass.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/what-is-stream.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-72346154095412802</guid><pubDate>Mon, 08 Jul 2013 07:17:00 +0000</pubDate><atom:updated>2013-07-08T00:17:15.236-07:00</atom:updated><title>c++ interview question | interview question in c++</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;b&gt;1: pure virtual construction can have a body&lt;/b&gt;&lt;br /&gt;ans - FALSE . there is no such entity as pure virtual&amp;nbsp; constructor .even if we were allowed to declare a pure virtual constructor , we would not be able to override it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2: there is one VPTR per VTABLE&lt;/b&gt;&lt;br /&gt;answer:&amp;nbsp; - FALSE&amp;nbsp; . this is because each object contains VPTR in it&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3: there is one VPTR per object&lt;/b&gt;&lt;br /&gt;Answer : True But all the object has the same VPTR&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4: The VPTR always points to the VTABLE of the class&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;answer - true;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5: virtual functions permit functions from different classses to be executed through the same function call&lt;/b&gt;&lt;br /&gt;answer:- True. This is one form of polymorphism .&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6: A class containing a pure virtual function is called&lt;/b&gt;&lt;br /&gt;&amp;nbsp;ans- Abstract class&lt;br /&gt;&lt;b&gt;7: virtual function calls work faster than normal function calls&lt;/b&gt;&lt;br /&gt;ans: false . This is because the call to the virtual function&amp;nbsp; is resolved at runtime . Moreover the call is resolved after retrieving the address of the function from the VTABLE . Thus it conumes time&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;The call to the normal function is resolved at&amp;nbsp; compile time also there is no mechnaism&amp;nbsp; of VTABLE&amp;nbsp; involved in calling the normal function&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;8:&amp;nbsp; virtual functions can be safely invoked using objects&lt;/b&gt;&lt;br /&gt;ans: &amp;nbsp; TRUE&lt;br /&gt;&lt;br /&gt;&lt;b&gt;9:&amp;nbsp; The behaviour of virtual functions is same irrespective of whether we invoke them through pointers or references;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;answer - TRUE&lt;br /&gt;&lt;br /&gt;&lt;b&gt;10: A pure virtual destructor can have a function body&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ANS - False . There is no such concept of pure pure virtual destructor in c++&lt;br /&gt;&lt;br /&gt;&lt;b&gt;11: The virtual function of a a base class that is overridden in the derived class also becomes virtual&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Ans true; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;12 : An abstract class typically doesn&#39;t need a constructor&amp;nbsp;&lt;/b&gt;&lt;br /&gt;ans: TRUE, since we cannot instantiate an object from an abstract class there is not need to constructor in that class&lt;br /&gt;&lt;br /&gt;&lt;b&gt;13 : how many&amp;nbsp; VTABLE&amp;nbsp; will be in&amp;nbsp; class&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;ANS: one ;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;14 : can be access the VTABLE using the this pointer;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;ans &lt;b&gt;: &lt;/b&gt;true ,we can access the vatable using&amp;nbsp; &#39;this&#39;&amp;nbsp; pointer&lt;b&gt; ;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;15: What is VPTR&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;ANS: The address of the VTABLE stored in the object is known as VPTR&lt;br /&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/c-interview-question-interview-question.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-6734168887522360270</guid><pubDate>Sun, 07 Jul 2013 13:44:00 +0000</pubDate><atom:updated>2013-07-07T06:44:21.996-07:00</atom:updated><title>why destructor are not virtual by default </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;suppose a class der is derived from&amp;nbsp; a class base . if&amp;nbsp; we now create a der class object by saying&lt;br /&gt;&lt;br /&gt;base *p;&lt;br /&gt;&lt;br /&gt;p = new der;&lt;br /&gt;then firstly the base class constructor would be called followed&amp;nbsp; by a call to the derived class constructor&amp;nbsp; if we now say delete p, then destruction should proceed&amp;nbsp; from der to base . This can be ensured&amp;nbsp; by declaring the base class destructor as virtual . when we declare virtual destructor time&amp;nbsp; is spent in building the vtable&amp;nbsp; if we don&#39;t intend to create the objects&amp;nbsp; through&amp;nbsp; new then&amp;nbsp; there&amp;nbsp; is no need to create unnecessarily time would have been spent for building vtable enven if you don&#39;t need it, hence destructor are not made virtual by default .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/why-destructor-are-not-virtual-by.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-2690048350730567301</guid><pubDate>Sun, 07 Jul 2013 13:34:00 +0000</pubDate><atom:updated>2013-07-07T06:34:23.277-07:00</atom:updated><title>why the member functions are not virtual by default </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;The mechanism of virtual functions is not very efficient. As compared to a simple call , to an absolute address. there are more sophisticated assembly instructions required to set up the virtual functions call. Thsi requires both code space and execution time . All the non virtual function&amp;nbsp; calls are implemented&amp;nbsp; through early binding and all the virtual&amp;nbsp; function&amp;nbsp; are implemented through late binding&amp;nbsp; thus , had all the function call i9n c++ been implemented through late binding , the&amp;nbsp; efficiency&amp;nbsp; would have suffered heavly .&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/why-member-functions-are-not-virtual-by.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-2294550402445598030</guid><pubDate>Sun, 07 Jul 2013 04:08:00 +0000</pubDate><atom:updated>2013-07-06T21:08:15.554-07:00</atom:updated><title>what is abstract class | abstract class</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;A class that contains at least one pure virtual function is called&amp;nbsp; an abstract class. An abstract class cannot&amp;nbsp; be instianiated. we create such a class when a class is too general and it is irrelevant&amp;nbsp; to create object of such a class. For&amp;nbsp; example , a class shape , but classes like line , rectangle, circle, etc are specific classes and objects of these classes carry meaning. Abstract classes are used mainly for polymorphioc calls.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/what-is-abstract-class-abstract-class.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-1793599907777166554</guid><pubDate>Sat, 06 Jul 2013 10:03:00 +0000</pubDate><atom:updated>2013-07-06T03:03:28.333-07:00</atom:updated><title>what is ambiguity in overloading a function </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; void&amp;nbsp; f(int i)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; void f(int&amp;nbsp; &amp;amp;i)&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The function f() is overl;oaded to accept an int value and an int reference . but if we call f() as shown&lt;br /&gt;int i = 9;&lt;br /&gt;f(i);&lt;br /&gt;the compiler cannot figure out whether to call the version of f() that accepts a value or the one that accepts a reference. since&amp;nbsp; the syntex of calling both is same, it&amp;nbsp; result in an ambiguity;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/what-is-ambiguity-in-overloading.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-3768311103667251799</guid><pubDate>Sat, 06 Jul 2013 07:17:00 +0000</pubDate><atom:updated>2013-07-06T00:17:59.441-07:00</atom:updated><title>what is advantage of an inline function | what is an inline function | inline function </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In case of an inline function the compiler takes decision whether to insert&amp;nbsp; the code or not depending upon the size of code and the compiler&#39;s optimizations settings. hence there is more likelyhood of&amp;nbsp; more optimized code getting generated.&lt;br /&gt;In line function&amp;nbsp; provides better type checking and does not have side effects;&lt;br /&gt;&lt;br /&gt;example :-&lt;br /&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;&lt;br /&gt;using namespace std; // this is namespace&lt;br /&gt;&lt;br /&gt;inline float square(float y)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return y*y;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // calling&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float x = square(7);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/what-is-advantage-of-inline-function.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-937582407533020801</guid><pubDate>Sat, 06 Jul 2013 05:45:00 +0000</pubDate><atom:updated>2013-07-05T22:45:07.242-07:00</atom:updated><title>what is  header files in c++</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Header files merely contains function declarations. ?Header files generally have&amp;nbsp; .h extension ;&lt;br /&gt;&lt;br /&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/what-is-header-files-in-c.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-8041141800679102334</guid><pubDate>Sat, 06 Jul 2013 05:40:00 +0000</pubDate><atom:updated>2013-07-05T22:40:39.576-07:00</atom:updated><title>what do you mean by function overloading | what is function overloading  | what is library function </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Defining multiple functions&amp;nbsp; with the same name is called function overloading. these functions must differ in their number, order or types of arguments&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Library function &lt;/b&gt;:-&lt;br /&gt;Library functions are a collection of predefined functions. they are stored in &#39;.lib&#39; files are shipped&amp;nbsp; with the compiler;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/what-do-you-mean-by-function.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-3531288184250039140</guid><pubDate>Sat, 06 Jul 2013 05:34:00 +0000</pubDate><atom:updated>2013-07-05T22:34:53.914-07:00</atom:updated><title>c++ permits the use of anonymous structures | what is anonymous structures | anonymous  structure</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;yes , c++ permists&amp;nbsp; Anonymous structure.&lt;br /&gt;Anonymous structure means the structure that does not have any name. such a structure is created when it is not required at other places. this is shown in the following code.&lt;br /&gt;&lt;br /&gt;struct&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int i;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float f;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; char ch;&lt;br /&gt;}s;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/c-permits-use-of-anonymous-structures.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-8485271032691949407</guid><pubDate>Fri, 05 Jul 2013 12:31:00 +0000</pubDate><atom:updated>2013-07-05T05:31:58.894-07:00</atom:updated><title>can we create an object dynamically | how to create object dynamically</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;yes we can create object dynamically. The keyword&amp;nbsp; new allows us to create an object dynamically&lt;br /&gt;&lt;br /&gt;example:-&lt;br /&gt;&amp;nbsp;CSample *P = new sample;&lt;br /&gt;&amp;nbsp;Assume that sample is a user-defined class. new sample&amp;nbsp; creates an object dynamically and &lt;br /&gt;&amp;nbsp;and the address of that object is returned which has been collected in p;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/can-we-create-object-dynamically-how-to.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-3104522142050545105</guid><pubDate>Fri, 05 Jul 2013 12:14:00 +0000</pubDate><atom:updated>2013-07-05T05:14:42.250-07:00</atom:updated><title>can we overload pre increment ++ operator | how to overload   operator </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;yes&amp;nbsp; we can overload&amp;nbsp;&amp;nbsp;, this we can do by defining the function() inside the class, this we can overload by two method , in those two one is known as pre increment&amp;nbsp;&amp;nbsp;operator overloading and another is post increment&amp;nbsp; overloading method.&lt;br /&gt;&lt;br /&gt;Example&amp;nbsp; :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class sample&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // code&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; sample operator++() // pre-increment&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; // code;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; sample operator++(int ) // post increment&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // code;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; };&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Note that if the post increment ++ operator is not defined then for&amp;nbsp; both ++a and a++&amp;nbsp; the&amp;nbsp;&amp;nbsp; pre-increment ++ operator function gets called vice-versa is however not true ;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/can-we-overload-pre-increment-operator.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-1814470455851890006.post-7234939439831104321</guid><pubDate>Fri, 05 Jul 2013 08:39:00 +0000</pubDate><atom:updated>2013-07-05T01:39:41.008-07:00</atom:updated><title>write one case where friend function is necessary | uses  of friend function  | can we make a class friend </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;when we want&amp;nbsp; that an object of a user defined type should be printed&amp;nbsp; using cout then it is necessary&amp;nbsp; to overload operator&amp;nbsp; &amp;lt;&amp;lt;(). This function is decalred as friend in the class whose object we want to print.&lt;br /&gt;&lt;br /&gt;yes, we can make the entire class as a friend then automatically all the member functions and data member&amp;nbsp; of the class&amp;nbsp; become friends .Hence we can access all of them&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://avinashpatna.blogspot.com/2013/07/write-one-case-where-friend-function-is.html</link><author>noreply@blogger.com (Avinash Kumar)</author><thr:total>0</thr:total></item></channel></rss>