Can we create a 'const' object in C++?

179. Can we create a "const" object in C++?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, we can create a "const" object in C++, using a "const" object. Any attempt to change the data member of const objects results in a compile-time error.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.