If a class is written with no constructor, the compiler provides a default constructor.
In the Object Oriented paradigm, a special kind of member function of a class that initializes its objects is called a constructor. When a class is defined without a constructor, the compiler provides a default constructor for it. The default constructor is a constructor that does not have any argument. But if a constructor with arguments or without arguments is created for a class, the compiler does not provide a default constructor for that class.
A constructor is used to assign default values to data members of a class. It has the same name as the class is with no return type. when an object of the class is created, constructor is automatically called. In case, when a class has no constructor, the compiler calls a default constructor for it.
You can learn more about default constructor at
https://brainly.com/question/13267121
#SPJ4