C

[C/C++] ポインタ

More than 1 year has passed since last update.
#include <stdio.h>

int main() {

    short **pp;
    short *p;
    short data = 3;

    p = &data;
    pp = &p;

    //変化する前のDATA
    printf_s("%d \n", data);

    *p = 5;
    printf_s("%d \n", data);

    **pp = 10;
    printf_s("%d \n", data);

    return 0;
}