Which of the following is true about const member functions? | CPP MCQs

A. const members can be invoked on both const as well as nonconst objects
B. const members can be invoked only on const objects and not on nonconst objects
C. nonconst members can be invoked on const objects as well as nonconst objects
D. none of the above

Answer: A

0 comments:

Post a Comment

Blogger news