πŸ“Š C++
Q. Code reuse can be achieved in a C++ program using ______.
  • (A) Polymorphisme
  • (B) Encapsulation
  • (C) Inheritance
  • (D) Both A and C are true.
πŸ’¬ Discuss
βœ… Correct Answer: (C) Inheritance

Explanation: Inheritance is a process of defining a new class based on an existing class by inheriting its common members and methods. Inheritance allows us to reuse code, it improves the reusability in your C++ code.

Explanation by: Dharmendra Sir
Inheritance is a process of defining a new class based on an existing class by inheriting its common members and methods. Inheritance allows us to reuse code, it improves the reusability in your C++ code.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
231
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Dharmendra Sir
Publisher
πŸ“ˆ
99%
Success Rate