0
Can anyone tell me the output of this program and help me to know how did you get that....pls
#include<iostream.h> struct point { int X,Y; }; void show (point P) { cout<<P.X<<":"<<P.Y<<endl; } int main() { Point U = {20,10},V,W; V=U; V.X+=20; W=V; U.Y+=10; U.X+=5; W.X-=5; show(U); show(V); show(W); return0; }
4 Answers
+ 2
first U is {x=20;y=10;}
V is now {x=20;y=10};
V.x=40;
W={x=40;y=10;}
U.y=20;
U.x=25;
W.x=35;
//the output is:
20:25
40:10
35:10
+ 2
ali sir thanks one more time....tomorrow is my computer EXAM in school...with this help I have solved 3 more questions
+ 1
thanks a lot...
+ 1
welcome đ