What is a Parameterized Constructor?

Constructor which contains parameters or arguments is known as Parameterized Constructor. Parameters are send to the constructors at the time of creation of object of the class.

Eg: class student
{
Int roll;
Float marks;
public:
Student(int r,float m) //Parameterized Constructor
{
Roll=r;
Marks=m;
}

More Questions

Leave a Reply

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