Default copy constructor of compiler copies all the member variables from source to destination object. This is called shallow copy constructor.
void main(int argc, char *argv)
c1.var1 = 1;
cout << "value of c2.val " << c2.val;
You have viewed 1 page out of 62. Your C++ learning is 0.00% complete. Login to check your learning progress.
C++ this pointer in static function
Can Destructor be overloaded
Understand vptr/vtable vfptr/vftable pictorial view
Template vs macro in c++
Default access modifier of structure
Make money through passive income
Get education loan for higher study
Best budget laptops for students
Best budget mobile phones for students
EQuestionAnswers is a non-profit organization. We publish educational articles and interview materials. Most of the viewers prefer to signup and stay connected with us. We maintain the viewer's privacy and do not send bulk or spam emails. Please signup and start learning with us.
By creating an account you agree to our Terms & Privacy.