English

What is a constructor?

Advertisements
Advertisements

Question

What is a constructor?

Short Answer
Advertisements

Solution

  1. A constructor is a special member function of a class. Its task is to initialize the objects of its class.
  2. It is special because its name is the same as that of the class to which it belongs.
shaalaa.com
  Is there an error in this question or solution?
Chapter 4: Constructors - Exercises [Page 115]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 4 Constructors
Exercises | Q 3. (i) a | Page 115
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×