/* 3. ´ÙÀ½ ÇÁ·Î±×·¥ÀÇ Ãâ·ÂÀ» ½á¶ó. */ #include typedef struct xxx { int a; int b; int c; } XXX; void hello(XXX x) { x.b = x.a; x.a = x.c; x.c = x.b; } void olleh(XXX *x) { x->b = x->c; x->c = x->a; x->a = x->b; } int add(XXX r,XXX *s) { return r.c + s->c; } main() { int number[5] = { 1, 2, 3, 4, 5 }; XXX p = { number[0], number[1], number[2] }; XXX q = { number[2], number[3], number[4] }; int y; hello(p); olleh(&q); y = add(p,&q); printf("result = %d\n",y); }