Computer Science, asked by deepalikashyap7288, 1 year ago

What is Constructors and Destructors?

Answers

Answered by mridulbhai
1

who construct the thing is a constructor which destroy is distructor

Answered by rahulgrover033
1

Constructors are special class functions which performs initialization of every object. The Compiler calls the Constructor whenever an object is created. Constructors initialize values to object members after storage is allocated to the object.

Whereas, Destructor on the other hand is used to destroy the class object.

Let's start with Constructors first, following is the syntax of defining a constructor function in a class:

please select it in braineist answers

Similar questions