Which of the following is a keyword in C++ but not a keyword in C?
Options
- A. while
- B. return
- C. class
- D. More than one of the above
- E. None of the above
Quiz Practice:
C. class
Answer: (C) class
class is a reserved keyword in C++ and is used to define a class.
C does not have the C++ class keyword. Therefore, this is a useful example of a difference between the reserved words of C and C++.
while and return are keywords in both C and C++.