What are the characteristics of a constructor in c++
Answers
Answered by
0
The constructor function initialises the class object.
The memory space is allocated for the object(Member Function &Data member)
The memory space is allocated for the object(Member Function &Data member)
Answered by
6
Characteristics are :-
• the constructor has the same name as the class name
• constructor should be declared as public always
• they don't return value and hence does not have any return type
• constructor are invoked automatically when an object of the class is created
Similar questions
Social Sciences,
7 months ago
Physics,
7 months ago
Physics,
7 months ago
Computer Science,
1 year ago
English,
1 year ago