1.

Can a constructor function be constant?(a) Yes, always(b) Yes, only if permissions are given(c) No, because objects are not involved(d) No, neverThe question was asked in homework.The above asked question is from Constant Member Functions topic in portion Member Functions & its Types of Object Oriented Programming

Answer»

Right CHOICE is (d) No, never

Best explanation: The constructors can’t be MADE const. This is to ensure that the constructor is CAPABLE of initializing the values to the members of the object. If it is made constant then it won’t be able to INITIALIZE any data member values.



Discussion

No Comment Found

Related InterviewSolutions