Which of the following statements with reference to constructor in C++ is FALSE?

PYQ DSSSB 2022Modified — slightly modified from the official paper; see the solution

Which of the following statements with reference to constructor in C++ is FALSE?

  1. A.

    It should not have the same name as the class.

  2. B.

    It is a special method that is automatically called when an object of a class is created.

  3. C.

    It is always public.

  4. D.

    It does not have any return value.

Attempted by 826 students.

Sign up free to check your answer

Sign up free

Explore the full course: Dsssb Tgt Computer Science Complete Course

Loading lesson…