C++ Quiz

1. What is the primary purpose of the iostream header file in C++?

2. Which keyword is used to declare a class in C++?

3. What is the purpose of the :: operator in C++?

4. Which keyword is used to define a constant variable in C++?

5. What is the purpose of a constructor in a C++ class?

6. Which keyword is used to inherit a class in C++?

7. What does the new operator do in C++?

8. Which access specifier makes a class member accessible only within the class and its friend functions?

9. What is the purpose of a destructor in a C++ class?

10. Which operator is used to access members of a class through a pointer?

11. What is the purpose of the virtual keyword in C++?

12. What is the purpose of function overloading in C++?

13. What is the purpose of a friend function in C++?

14. Which exception handling keywords are used in C++?

15. What is the purpose of templates in C++?

16. What is the purpose of the static keyword when used with a class member?

17. What is the purpose of namespaces in C++?

18. Which operator is used to dereference a pointer in C++?

19. What is the purpose of the inline keyword in C++?

20. What is the purpose of the auto keyword in C++11 and later?