Q) Compile time polymorphism in C++ language are
- Operator overloading
- Function overloading
- Function overriding
- B Only
- A & B
Answer: 5
Q) C++ abstract class can contain
- Pure virtual function
- Non-virtual function
- Only pure virtual function
- Both pure virtual and non-virtual function
Answer: 4
Q) False statements about function overloading is
- Defining multiple functions with same name in a class is called function overloading
- Overloaded function must differ in their order and types of arguments.
- Overloaded functions should be preceded with virtual keyword
- No statement is false
Answer: 3
Q) Following keyword is used before a function in a base class to be overridden in derived class in C++
- override
- virtual
- void
- none
Answer: 2
Q) Which of the following cannot be overloaded in C++?
- Increment operator
- Constructor
- Destructor
- New and delete operator
Answer: 3
Destructor of a class cannot be overloaded in C++ programming. Increment operator, constructor and new and delete can be overloaded.
You can read here in C++ constructor overloading example and benefits of constructor overloading in C++ programs. Also the program example of new and delete operator overloading.