![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its private and protected members. A friend function is not a member of the class. But it must be Latest Answer : Its the main feature of a class that private member data of a class can be accessed only by the class' member functions. But there is an exception , A class can allow non-member functions and other classes to access its own private data, by ... 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 : A virtual function allows derived classes to replace the implementation provided by the base class. ... "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. ... 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 : The C++ compiler identifies a function by its signature (function signature). The function signature is broken down into the following components in that order.The parameter list ... The idea behind inline functions is to insert the code of a called function at the point where the function is called. If done carefully, this can improve the application's performance in exchange Latest Answer : inline function is a function which extends the code when it is invoked. Otherwise is skip the code. ... 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 : template is used for creating generic functions as well as data members. ... Namespaces allow us to group a set of global classes, objects and/or functions under a name. To say it somehow, they serve to split the global scope in sub-scopes known as namespaces. The form to Latest Answer : Minimize name collision in the global name space, this namespace keyword assining a distinict name to a libray to use the same indentifier names without creating any name collision further name more the compiler uses the namespce signature for ... A pure virtual member function is a member function that the base class forces derived classes to provide. Normally these member functions have no implementation. Pure virtual functions are equated to Latest Answer : Pure virtual function is a virtual function which has no defination in base class but must be redefined in derieved class or else compile time error will be generated by the compiler.any class which is having atleast on pure virtual function is termed ... Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching Latest Answer : Virtual constructor is not build-in C++ feature but it doesn't mean its not used by devs in code and in conversations. There are many other things that doesn't exist in particular language yet, people find ways around to solve it (SingleTon, Virtual Constructor, ... We can overload assignment operator as a normal function.But we can not overload assignment operator We can overload assignment operator as a normal function.But we can not overload assignment operator as friend function why?
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||