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