![]() Related Questions Ø Public, protected and private are three access specifiers in C++. Ø Public data members and member functions are accessible Latest Answer : Private Protected and Public all these are access specifiers.Private Data Members are only available inside classProtected Data Members are only available inside class as well as in derived classes.Public Data members are available ... 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 : Friend function is used in OOP languages which allows a private or protected function to be accessed by a member outside a class.
Any function outside a Class can be given access to work with members inside a class by simply writing a keyword
friend ... 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. ... A scope resolution operator (::), can be used to define the member functions of a class outside the class. Latest Answer : It is an operator :: used mainly in class for defining the member funtions and also for accessing the global variables. ... "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 : Here are some examples1) Function overloadingclass FuncOver {public: // Constructors can also be overloaded. FuncOver(); // Overloaded constructor. ... Friend classes are used when two or more classes are designed to work together and need access to each other's implementation in ways that the rest of the world shouldn't be allowed to have. Latest Answer : virtual class :: It is an inner class which can be overriden by the derived classes. ... 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 : 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 ... 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 : Namespace is simply a name given to a global space, to form a sub-space in global space. ...
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||