In C++, which keyword is used to declare an abstract class?
- virtual
- volatile
- pure
- abstract
An abstract class in C++ is a class that cannot be instantiated and is meant to be inherited by other classes. It's declared using the virtual keyword, especially when a virtual function is set to 0, making it a pure virtual function, thus making the class abstract.
Loading...
Related Quiz
- In a real-time gaming application written in C++, which smart pointer would you choose to manage instances of game objects, assuming the objects need to be shared across multiple game scenes?
- Which access specifier in C++ allows a class member to be accessible only within the class and friends of the class?
- Which operator will give the remainder of a division operation?
- Which type of loop is best suited when the number of iterations is known ahead of time?
- What is the primary purpose of a function in C++ programming?