English

A constructor is used to initialize the data members of a class. - Computer Applications

Advertisements
Advertisements

Question

A constructor is used to initialize the data members of a class.

Options

  • True

  • False

MCQ
True or False

Solution

This statement is True.

Explanation:

A constructor is a class-specific member function used automatically when an object is created. Its principal purpose is to set default or specified values for the class's data members. 

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

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×