C++ MQCs with Explanation.( CHAPTER 2: BEGINNING WITH C++)

If a is an object of the class B and void print (void) is a member function of B, then which one of the following statements will invoke the function? ?

  1. a::print();
  2. a.voidprint();
  3. B.print();
  4. a.print();



Answer: 
Option d: a.print();

Explanation Here

Post a Comment

0 Comments