主页
C 语言
C 指针
demo_pointers2
运行 ❯
×
更改方向
保存代码
更改主题
#include
int main() { int myAge = 43; // Variable declaration int* ptr = &myAge; // Pointer declaration // Reference: Output the memory address of myAge with the pointer (0x7ffe5367e044) printf("%p\n", ptr); // Dereference: Output the value of myAge with the pointer (43) printf("%d\n", *ptr); return 0; }
0x7ffe5367e044
43