this is language C.. as far as i understand it's creating 3 add constructor in add function which.. that's a valid function.. which means every time you call add class it will automatically run..
I guess you could say it's valid circa 1995 C++. It just needs some NEAR pointers and for loops without proper scoping to fully recreate the experience.
Constructor without parameters
Parmeterized constructor
Copy Constructor
Enter data
2
3
Copy Constructor
Paramerized Constructor
Parameterized Constructor
Object a: The numbers are 2 3
The sum of the numbers are 35
Object b
The numbers are 4253 12290
The sum of the numbers are 0
Object c
The numbers are 10 20
The sum of the numbers are 41
Kindly explain the above output only..... (Bold type)
It should compile enough, if one discards/fixes non-standard and deprecated bits.
If you do go through the code step by step, then you can track each value. Simple mental exercise. Compiler should warn about the step that adds undefined behaviour to some results.