C++ Theory Quetions
C++ Theory Quetions
2. What is a class?
3. What is an object?
4. List the types of inheritance supported
in C++.
5. What is the role of protected access
specifier?
6. What is encapsulation?
7. What is an inline function?
8. What is an friend function?
9. What is a reference variable in C++
10. What is role of static keyword on class
member variable?
11. Explain the static member function.
12. What is the data type to store the
Boolean value?
13. What is function overloading?
14. When a class member is defined
outside the class, which operator can be
used to associate the function definition to
a particular class?
15. What is a destructor?
16. Can it be overloaded?
17. What is a constructor?
18. What is a default constructor? Can we
provide one for our class?
19. Which operator can be used in C++ to
allocate dynamic memory?
20. Can we implement all the concepts of
OOPS using the keyword struct?
21. What is the scope resolution operator?
22. What is a namespace?
23. What is a class template?
24. Can a program be compiled without
main() function?
25. Where an automatic variable is stored?
26. What is a container class?
27. What are command line arguments?
28. What are the different ways of passing
parameters to the functions? Which to use
when?
29. What is reminder for 5.0 % 2?
30. Which compiler switch to be used for
compiling the programs using math library
with g++ compiler?
31. Which operator can be used to
determine the size of a data type/class or
variable/object?
32. What is recursion?