c언어1 구조체 종합문제 배열 SWAP 하기 #include #include #include typedef struct { int xpos; int ypos; }Point; void printPoint(Point point) { printf("x: %d, y:%d\n", point.xpos, point.ypos); } void prac2002() { Point position1 = { 3,6 }; Point position2 = { 4,9 }; Point temp; temp = position1; position1 = position2; position2 = temp; printPoint(position1); printPoint(position2); } void main() { prac2002(); } x: 4, y:9 x: 3.. 2022. 4. 6. 이전 1 다음