C++ MQCs with Explanation (CHAPTER 5: CLASSES AND OBJECTS

When called by its object, a member function declared as const?

  1. can modify data of only const members.
  2. can modify data of only non-const members.
  3. can modify data of only non-const members.
  4. cannot alter any data in the class



Answer: 
Option d: cannot alter any data in the class

Explanation Here

Post a Comment

0 Comments