πŸ“Š C++
Q. Which of the following is the correct way to call a member function of a class in C++?
  • (A) object->function();
  • (B) object.function();
  • (C) function(object);
  • (D) object.function();
πŸ’¬ Discuss
βœ… Correct Answer: (B) object.function();

Explanation: In C++, to call a member function of an object, you use 'object.function();'.

Explanation by: Gopal Sharma
In C++, to call a member function of an object, you use 'object.function();'.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
170
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Gopal Sharma
Publisher
πŸ“ˆ
91%
Success Rate