G

Gopal Sharma • 38.32K Points
Coach

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();
  • Correct Answer - Option(B)
  • Views: 43
  • Filed under category C++

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics