/* 2. ´ÙÀ½ ÇÁ·Î±×·¥ÀÇ Ãâ·ÂÀ» ½á¶ó. */ #include typedef struct _point { int x; int y; } Point; void add(Point *a,Point *b, Point *c) { c->x = a->x + b->x; c->y = a->y + b->y; } void add100(Point p) { p.x = p.x + 100; p.y = p.y + 100; } main() { Point a = { 10, 20 }; Point b = { 30, 40 }; Point c = { 50, 60 }; add100(a); add100(b); add(&a,&b,&c); add100(c); printf("result = (%d,%d)\n",c); }