MENU
Question -

Write any two differences between Constructors and Destructors. Write the function headers for constructor and destructor of a class member. 



Answer -

Constructor

Destructor

(i)

Invoked every time when the object is created

Invoked everytime when object goes out of scope.

(ii)

Used to construct and initialize object values.

Used to destroy objects

[1]
Function Headers:

Constructor:
Member ( )
Destructor:
~ Member ( )    [1]

 

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×