πŸ“Š C++
Q. Which of the following is the correct way to define a destructor in a derived class in C++?
  • (A) ~DerivedClass() { }
  • (B) void ~DerivedClass() { }
  • (C) int ~DerivedClass() { }
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) ~DerivedClass() { }

Explanation: The correct way to define a destructor in a derived class is '~DerivedClass() { }'.

Explanation by: Vinay
The correct way to define a destructor in a derived class is '~DerivedClass() { }'.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
97
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vinay
Publisher
πŸ“ˆ
81%
Success Rate