![]() Related Questions Object is a software bundle of variables and related methods. Objects have state and behavior. Latest Answer : An object is an instance of the class through which we can access the methods and class variables ... Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also. Latest Answer : You cannot use inline functions in a structure ... A virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually Latest Answer : It is a functions whose behaviour can be overriden with an inherited class by a function of same signature. It is an important part of OOPS and Polymorphism. ... "Poly" means "many" and "morph" means "form". Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms Latest Answer : C++ enables polymorphism - The ability of obejcts of different classes related by inheritance respond differntly to the same function call. ... Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects. Ø A Class Latest Answer : Class is a combination of data member & member function where object is used for calling function In class we declare In object we call ... Packaging an object’s variables within its methods is called encapsulation. Latest Answer : According to me encapsulation is the process in which we can collect the data members and functions in one place or we can say that to encapsulate the related things. ... The free subroutine frees a block of memory previously allocated by the malloc subroutine. Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, Latest Answer : free() - releases the memory of the pointer passed as parameter, to the OS/application consumption. Using the pointer after free() will result in undefinded resultsrealloc() - used to resize the memory held by the pointer to the number of bytes specificed. ... Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This Latest Answer : Here are some examples1) Function overloadingclass FuncOver {public: // Constructors can also be overloaded. FuncOver(); // Overloaded constructor. ... Templates allow to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until certain point they fulfill Latest Answer : A template parameter is a special kind of parameter that can be used to pass a type as argument: just like regular function parameters can be used to pass values to a function, template parameters allow to pass also types to a function. These function ... Runtime type identification (RTTI) lets you find the dynamic type of an object when you have only a pointer or a reference to the base type. RTTI is the official way in standard C++ to discover the type Latest Answer : We can only assign a derived object to a base object pointer and a base class member to a derived class member pointer. ...
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||