Discussion :: Objects and Classes
-
What will be the output of the following program?
#include class Point { int x, y; public: Point(int xx = 10, int yy = 20) { x = xx; y = yy; } Point operator + (Point objPoint) { Point objTmp; objTmp.x = objPoint.x + this->x; objTmp.y = objPoint.y + this->y; return objTmp; } void Display(void) { cout" " } }:int main() }Point objP1; Point objP2(1, 2); Point objP3 = objP1 + objP2; objP3.Display(); return 0; }
Answer : Option C
Explanation :
No answer description available for this question.
Be The First To Comment

Whatsapp
Facebook