让你快速了解C语言指针的作用

时间:2024-10-13 09:47:05

1、打开啊哈c编译器

让你快速了解C语言指针的作用

2、int a; a = 10;

让你快速了解C语言指针的作用

3、 int *p; p = &a;

让你快速了解C语言指针的作用

4、printf("a ad蟠校盯昂dress is %p\n",p); int *p2 = (int *)0x0060ff00;

让你快速了解C语言指针的作用

5、*p2 = 10; printf("在内存的%p位置,存放的是%d\n",p2,*p2); // volatile i荏鱿胫协nt *p2 = (volatile int *)0x0060ff00;//类型修饰符,多线程时提高准确度

让你快速了解C语言指针的作用

6、运行程序

让你快速了解C语言指针的作用
© 手抄报圈