From 9a97d6180c15d17c0d18ad68336e0e32cd2a8572 Mon Sep 17 00:00:00 2001 From: foxliver Date: Thu, 25 Sep 2025 17:48:17 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=91=EC=9A=A9=EB=AC=B8=EC=A0=9C=202=20:=20?= =?UTF-8?q?=EA=B0=92=EC=9D=98=20Swap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Practice_03/app03-2.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Practice_03/app03-2.c diff --git a/Practice_03/app03-2.c b/Practice_03/app03-2.c new file mode 100644 index 0000000..b55e8e9 --- /dev/null +++ b/Practice_03/app03-2.c @@ -0,0 +1,16 @@ +#include + +int main(){ + int a, b; + a = 2, b = 1; + + printf("변경전 => a(%p) = %d, b(%p) = %d\n", &a, a, &b, b); + + int c = a; + a = b; + b = c; + + printf("변경후 => a(%p) = %d, b(%p) = %d\n", &a, a, &b, b); + + return 0; +} \ No newline at end of file