What is a constructor?
a) A class automatically called whenever a new object of this class is created.
b) A class automatically called whenever a new object of this class is destroyed.
c) A function automatically called whenever a new object of this class is created.
d) A function automatically called whenever a new object of this class is destroyed.
Ans: c
b) A class automatically called whenever a new object of this class is destroyed.
c) A function automatically called whenever a new object of this class is created.
d) A function automatically called whenever a new object of this class is destroyed.
Ans: c
Post a Comment