#include <stdio.h>

int main() {
    int karina = 1;
    int winter = 2;
    int ningning = 3;

    printf("카리나의 집주소: %p\n", &karina);
    printf("윈터의 집주소: %p\n", &winter);
    printf("닝닝의 집주소: %p\n", &ningning);

    //포인터 변수
    int *giselle;
    giselle = &karina;
    printf("지젤이 간 집은? %p\n", giselle);
    giselle = &winter;
    *giselle = *giselle * 2;
    printf("지젤이 간 집은? %p %d\n", giselle, *giselle);
    giselle = &ningning;
    printf("지젤이 간 집은? %p\n", giselle);

    int *suman = giselle;
    printf("수만이가 간 집은? %p\n", suman);
    *suman = *suman + 2;
    printf("수만이가 간 집은? %p %d\n", suman, *suman);
    
    int a = 10;
    int *p = &a;
    a = 15;
    printf("%d\n", *p);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: