Briefly explain early binding and late binding? The word binding means the mechanism which the compiler uses to decide which function should be executed on which call. Early binding: The …
Read More »Define ambiguity resolution in inheritance. How can it be performed in C++?
Define ambiguity resolution in inheritance. How can it be performed in C++? When a derived class has two base classes, base classes have function with the same name. If we …
Read More »Clearly mention the rules when a class is inherited using private, public and protected mode?
Clearly mention the rules when a class is inherited using private, public and protected mode? Public derivation Private derivation Protected derivation private Not inherited Not inherited Not inherited protected …
Read More »Define Inheritance. Classify Inheritance
Define Inheritance. Classify Inheritance Inheritance is the process of creating new class from existing class. There are 5 types of inheritance. Single inheritance Multiple inheritance Hierarchical inheritance Multiple inheritance Hybrid …
Read More »Write the situation when copy constructor must be used?
Write the situation when copy constructor must be used? When an object of the class is returned by value. When an object of the class is passed by values as …
Read More »Difference between constructor and copy constructor
Difference between constructor and copy constructor Constructor Copy Constructor A default constructor is used to initialize data member of an object A copy constructor is used to copy the value …
Read More »Define constructor and write rules of constructor
Define constructor A constructor is a special type of member function that initializes an object automatically when it is created. Rules: The name of the constructors must be the same …
Read More »Different between Function overloading and Function overriding
Different between Function overloading and Function overriding Function overloading Function overriding Parameter must be different Parameter must be same It occurs with the same class It occurs different parent class …
Read More »Define Overloading and Overriding
Define Overloading If we create two or more members having same name but different in numbers or type of parameters, it is known as overloading. Two types of overloading – …
Read More »Define manipulators. Give Example
Manipulators are operators that are used to format data display. The most commonly used manipulators are setw() and endl, There are few manipulators – Setw() Setbase Setprecision() Setfill() Endl Showpoint …
Read More »