Question 1 of 25
Hints left: 3
Q1
Which type of polymorphism allows different classes to be treated as instances of the same class through a common interface?
Q2
How can you achieve runtime polymorphism in C++?
Q3
Which keyword is used to prevent further inheritance of a class in C++?
Q4
What is compile-time polymorphism in C++?
Q5
What is the difference between function overloading and function overriding in C++?
Q6
In C++, can you overload the return type of a function?
Q7
Which of the following is not a type of polymorphism in C++?
Q8
What is the purpose of a virtual destructor in C++?
Q9
What is the concept of function overriding in C++?
Q10
In C++, which keyword can be used to prevent a virtual function from being overridden in derived classes?
Q11
Which type of polymorphism is achieved by function templates in C++?
Q12
What happens if a pure virtual function is not implemented in a derived class in C++?
Q13
What is the role of the 'virtual' keyword in function declaration in C++?
Q14
What is the purpose of a pure virtual function in C++?
Q15
What is the main advantage of polymorphism in C++?
Q16
How is polymorphism different from overloading in C++?
Q17
Which C++ keyword is used to access the base class within a derived class?
Q18
What is the syntax for calling a virtual function from a derived class constructor in C++?
Q19
In C++, what is the effect of declaring a destructor as virtual?
Q20
Which of the following is true about virtual functions in C++?
Q21
Which C++ feature allows a function to behave differently based on the number or types of its arguments?
Q22
In C++, can a derived class have more than one base class with a virtual function?
Q23
Which type of polymorphism allows a class to have multiple methods with the same name but different signatures?
Q24
What is the difference between static binding and dynamic binding in C++?
Q25
In C++, can a function be both virtual and static at the same time?