Latest Answer : When classes are inherited, we need to make the base class destructor virtual – to make sure when the object is destroyed, all the derived class destructors also called. Otherwise the derived class destructors are not called because the there is compile ...
Explain "passing by value", "passing by pointer" and "passing by reference"
Latest Answer : The return type of the printf() function is 'int'. (lot of confusion surrounding the return type of printf -- correct answer is 'int') ...
Latest Answer : I am giving below another example of code optimization you can follow for C++ program. As we all know prefix operators apply the operations of incrementing or decrementing as specified and the new value is stored. In case of postfix operator the operations ...
Latest Answer : Strcture : It is collection of data (Data Types) which can be different in nature e.g. Student{ ...
Latest Answer : hey the above mentioned both reasons r same and correct .but other than this there one minor difference between both that si with their default storage:malloc() stores garbage values by default n calloc() contains all zeros by default ...
Latest Answer : there is no way to process an entire string.it has to be done char by char ...
Latest Answer : Use fread() and fwrite() ...
Latest Answer : Abstraction is a OOPs principle which means representation of real world objects in the computer by means of specifying its characteristics as data members and its operations as the class methods. ...
Latest Answer : Polymorphism is the ability to assume many forms. In short it refers to several methods / operators sharing the same name but having different parameter list and different implementations. Variables also can be polymorphic. There are two ways polymorphism ...