logo

Unit 5: Object-Oriented Programming (OOP) (10 Hours)

1. What does OOP stand for?

2. Which of the following is not a core concept of OOP?

3. What is the process of hiding the implementation details called?

4. Which of the following allows a class to inherit properties from another class?

5. What is a class?

6. What is an object?

7. Which keyword is used to define a class in most OOP languages?

8. What is the primary purpose of a constructor?

9. What is polymorphism?

10. Which of the following is true about encapsulation?

11. What does inheritance provide in OOP?

12. Which of the following is an example of a built-in data type?

13. What is a destructor?

14. What is method overloading?

15. What is method overriding?

16. Which of the following is an example of an access modifier?

17. What is the purpose of the super keyword?

18. Which of the following statements about interfaces is true?

19. What is the relationship between a class and an object?

20. What do you call a class that cannot be instantiated?

21. Which of the following is not an OOP language?

22. In OOP, what is a subclass?

23. What does the this keyword refer to in a class?

24. Which of the following is not a benefit of OOP?

25. In which of the following scenarios would you use polymorphism?

26. What is a key feature of OOP?

27. What is the purpose of the final keyword in OOP?

28. Which of the following terms refers to the act of combining data and functions?

29. What is a primary benefit of using abstract classes?

30. What is the difference between a class and a structure in OOP?

31. In OOP, what does the term "data hiding" refer to?

32. What is a class method?

33. Which of the following is true regarding constructors?

34. What is the output of the following code snippet if the class is named Example? Example obj;

35. What does the private access modifier do?

36. Which of the following is a characteristic of a base class?

37. In OOP, what is encapsulation?

38. Which keyword is used to inherit a class in most OOP languages?

39. What is a concrete class?

40. Which of the following statements is true about interfaces?

41. What is the purpose of the static keyword in OOP?

42. What do you call a function that is defined inside a class?

43. What is the output of the following code? cout << typeid(int).name();

44. What is the term for creating multiple functions with the same name but different parameters?

45. What does it mean if a class is derived from more than one base class?

46. What is a namespace in OOP?

47. What is the primary goal of OOP?

48. What is a key characteristic of an abstract class?

49. What is the purpose of using const in a method declaration?

50. What happens if a class does not define a constructor?

51. What is the purpose of the protected access modifier?

52. What do you call the data members of a class?

53. What is the role of a virtual keyword in OOP?

54. What is a class that cannot be instantiated called?

55. In which situation would you use a base class?

56. What is the purpose of the override keyword?

57. What is a key advantage of using OOP?

58. What is the default access modifier for class members in C++?

59. Which of the following can be used to create an object of a class?

60. What is inheritance in OOP?

61. Which of the following is true about a derived class?

62. What is a key feature of encapsulation?

63. In OOP, what does public mean?

64. Which of the following best describes a method?

65. What is the output of a method that does not return a value?

66. What is a key feature of object-oriented languages?

67. In OOP, which of the following refers to a set of attributes and methods?

68. Which of the following represents the relationship of "is-a"?

69. What is the primary function of an interface?

70. What is the term for the ability to call the same method on different objects?

71. Which of the following is an example of data abstraction?

72. What does the term "method signature" refer to?

73. In OOP, which of the following is true about classes?

74. What is the relationship between a base class and a derived class?

75. What is an example of an encapsulation in programming?

76. Which of the following is true about a function in a class?