From 8aa84f86ae3703ff9b819f9ed7d8ea62fc3512cb Mon Sep 17 00:00:00 2001 From: foxliver Date: Thu, 25 Sep 2025 17:39:45 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B3=80=EC=88=98=EC=9D=98=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=20=EC=9D=B4=EC=9C=A0=EC=99=80=20=EB=A9=94=EB=AA=A8?= =?UTF-8?q?=EB=A6=AC=20=EC=A0=90=EC=9C=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Practice_03/p03-3.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Practice_03/p03-3.c diff --git a/Practice_03/p03-3.c b/Practice_03/p03-3.c new file mode 100644 index 0000000..acf3e61 --- /dev/null +++ b/Practice_03/p03-3.c @@ -0,0 +1,16 @@ +#include +#include + +int main(void){ + int a = 10; + unsigned char *p = (unsigned char*)&a; + + printf("int a = %d\n", a); + printf("메모리 저장 순서 : \n"); + + for(int i = 0; i < sizeof(a); i++){ + printf("주소 %p : 0x%02X\n", (p + i), p[i]); + } + + return 0; +} \ No newline at end of file