← 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?
- A.It returns a constant
- B.It won't modify the object's data members
- C.It can only be called once
- 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 →