Excerpt:
Q. What are the access privileges in C++? What is the default access level?
A. C++ has three access privileges. They are private, public and protected. The default access level assigned to members of a class is private. Private members of a class are accessible only within the class and by friends of the class. Protected members are accessible by the class itself and it’s sub-classes. Public members of a class can be accessed by any class.
Q. What is name mangling in C++?
A. When we encode the parameter types with the function/method name into a unique name is called name mangling. The vice-versa is called demangling.
Q. What is ‘this’ pointer?
A. The ‘this’ pointer is a pointer accessible only within the member functions of a class, structure, or union type. It points to the object for which the member function is called. Static member functions do not have a this pointer. When a nonstatic member function is called for an object, the address of the object is passed as a hidden argument to the function.

Recently...
Most Popular Right Now




