Dereference

int myAge = 43; // variable declaration
int*ptr = &myAge; // pointer declaration
// Reference: output myAge with a pointer
// memory address (0x7ffe5367e044)
printf("%p\n", ptr);
// dereference: output the value of myAge with a pointer (43)
printf("%d\n", *ptr);
Comments