While copying the objects if we say X a=b, X a(b) What will it call, assignment operator or copy constructor? Justify

While copying the objects if we say X a=b, X a(b) What will it call, assignment operator or copy constructor? Justify

class check 
{

public:
 int a,b;

 check ();

 check(const check&);

check operator=(const check&);

 virtual ~check();

};

check::check(const check& y)
{ 
 
 cout << "i am in a copy constructor"<

By:Umang
Date:2001-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher