Q. Which of the following is the correct way to define a function with an override specifier in C++?

  • (A) void myFunction() override { }
  • (B) void myFunction() { }
  • (C) Both A and B
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) void myFunction() override { }
Explanation: The correct way to define a function with an override specifier is 'void myFunction() override { }'.
Explanation by: Vijay Sangwan
The correct way to define a function with an override specifier is 'void myFunction() override { }'.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
262
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vijay Sangwan
Publisher
πŸ“ˆ
94%
Success Rate