Q) Interface class in C++ is created by
- Using interface keyword before class
- Using pure virtual function
- Using pure virtual function and virtual function both
- Using class keyword
Answer: 2
C++ does not have keyword interface like C# or java. Pure virtual function is used to create an interface in C++ programs.
Q) Which statements are true about an abstract class
- Abstract class has at least one pure virtual function.
- Pointer for an abstract class can be created
- Object of an abstract class cannot be created.
- All are correct.
Answer: 4
Q) Run time polymorphism in C++ Program is
- New and delete operator overloading
- ++ and – – operator overloading
- :: operator overloading
- None
Answer: 4
Q) Run time binding is related to
- Function overriding
- Operator overloading
- A & B
- None
Answer: 1
Q) Which function cannot be overloaded in C++
- Constructor
- Class destructor
- Both a & b
- None
Answer: 2
Destructor of a class cannot be overloaded. Read in detail in the interview question can we overload destructor in C++ program?
Q) Operators can be overloaded in C++ is/are
- New
- Delete
- ++
- All can be overloaded
Answer: 4