Basics of C++ and Class Structure – MCQs

30 Score: 0 Attempted: 0/30 Subscribe
1. : Which of the following is the correct extension of a C++ source file?
 
2. : Which operator is used to create an object of a class in C++?
 
3. : What is the default access specifier for class members in C++?
 
4. : Which keyword is used to define a class in C++?
 
5. : Which of the following is used to declare a class object in C++?
 
6. : Which of the following is true about constructors in C++?
 
7. : What is the purpose of a destructor in C++?
 
8. : Which symbol is used to access members of a class using a pointer?
 
9. : What is encapsulation in C++?
 
10. : What does the keyword this refer to in C++?
 
11. : What type of function can access private members of a class?
 
12. : Which member function automatically gets called when an object is created?
 
13. : What is function overloading in C++?
 
14. : How many types of access specifiers are there in C++?
 
15. : What are the access specifiers in C++?
 
16. : Which keyword is used for inheritance in C++?
 
17. : What is polymorphism in C++?
 
18. : Which feature allows the reusability of code in OOP?
 
19. : What is the use of a virtual function in C++?
 
20. : What is the size of an empty class in C++?
 
21. : Can a constructor be virtual in C++?
 
22. : What is the role of the public keyword before a base class during inheritance?
 
23. : How do you declare a constant member function in a class?
 
24. : Can static member functions access instance variables?
 
25. : Which of the following is true about inline functions?
 
26. : Which concept hides internal object details from the user?
 
27. : How is dynamic memory allocated for objects in C++?
 
28. : What is a static member in C++?
 
29. : What is operator overloading in C++?
 
30. : Which of the following allows object creation without using the class name explicitly?
 

Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials