Q1) A member function having the same name as that of its class is called??????
Answers
Answer:
class name
Explanation:
class name
make me brainlist answer
Constructor
A constructor is function of a class that is called whenever an object is created. It is usually used to assign values to the variables of the class.
There is also a same function which has the same name as that of its class is Destructor, It juts have tilde (~) sign at the beginning. Being opposite of constructor, It is called whenever an object is deleted. This function is useful when we want to delete the data regarding the object to avoid memory leaks.
Value is assigned to the variables, defined in the class by passing arguments in the constructor parameters.
A class is a data type which is used to create objects that have the same number of variables defined in the class. It can create objects as many as you want. It helps in management of deletion and creation of objects.