🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: C++ Classes and Objects: all 10 questions

Quiz: C++ Classes and Objects · Question 4 of 10

What does a const member function promise?

What does a const member function promise?

  1. A.It returns a constant
  2. B.It won't modify the object's data members
  3. C.It can only be called once
  4. D.It is static
Answer & explanation

Correct answer: It won't modify the object's data members

const after the parameter list means the object is unchanged.

Can you get the rest right without peeking?

Take the timed Quiz: C++ Classes and Objects quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →