Skip to content
Related Articles

Related Articles

C++ | Constructors | Question 13
  • Last Updated : 16 Aug, 2013

We must use initializer list in a constructor when
(A) There is a reference variable in class
(B) There is a constant variable in class
(C) There is an object of another class. And the other class doesn’t have default constructor.
(D) All of the above


Answer: (D)

Explanation: See When do we use Initializer List in C++?

Quiz of this Question

Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.
My Personal Notes arrow_drop_up
Recommended Articles
Page :