Which keyword is used to inherit a class in C++?
- import
- extend
- inherit
- public
In C++, inheritance is specified by placing the colon (:) followed by an access specifier (public, protected, or private) and then the name of the base class. The public keyword itself is not used for inheritance, but rather indicates the type of inheritance.
Loading...
Related Quiz
- In which year was the C++98 standard officially published?
- What implications does the "Rule of Three" have in C++ class design?
- How does C++ enforce encapsulation and abstraction in multi-level inheritance scenarios?
- What is the basic idea behind recursion in programming?
- The operator used to determine the remainder when one number is divided by another is _______.