English

What is not true for a constructor? - Computer Applications

Advertisements
Advertisements

Question

What is not true for a constructor? 

Options

  • It is used only to initialize the data members.

  • It returns a unique value.

  • It may not use parameter.

  • None of the above.

MCQ

Solution

It returns a unique value.

Explanation:

A constructor does not return any value, even void. It simply initializes the object and returns nothing.

shaalaa.com
  Is there an error in this question or solution?
Chapter 7: Constructors - EXERCISES [Page 417]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 7 Constructors
EXERCISES | Q I. 5. | Page 417
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×