Home »
MCQs »
C++ MCQs
Which of the following is used to initialize the const members of the class using a constructor?
201. Which of the following is used to initialize the const members of the class using a constructor?
- Const constructor
- Default constructor
- Member initializer list
- Copy constructor
Answer: C) Member initializer list
Explanation:
In C++, a member initializer list is used to initialize the const members of the class.