#include <stdio.h>
int main() {
int a = 10, b = 20;
int *p = NULL;
p = &a;
printf("a의 값 : %d\n", a);
printf("a의 주소 : %p\n", &a);
printf("p의 값 : %p\n", p);
printf("p의 주소값이 가리키는 데이터 : %d\n", *p);
p = &b;
printf("b의 값 : %d\n", b);
printf("b의 주소 : %p\n", &b);
printf("p의 값 : %p\n", p);
printf("p의 주소값이 가리키는 데이터 : %d\n\n\n", *p);
int c = 10;
int *d = NULL;
d = &c;
printf("c의 값 : %d\n", c);
printf("d의 값 : %d\n", *d);
*d = 20;
printf("d의 값 변경 : %d\n", *d);
printf("c의 값 : %d\n", c);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: