What is a Default Constructor?

Constructor which does not contain any parameters (arguments) is known as Default Constructor.

Eg: class student
{
Int roll;
Float marks;
Public:
student() //Default Constructor
{
roll=10;
marks=500;
}
};

More Questions

Leave a Reply

Word Verfication * Time limit is exhausted. Please reload CAPTCHA.