int main(int argc, const char * argv[]) {
int a = 4,b = 5;
// int c = 6;
// int d = 7;
// int *p = &a;
//完全初始化
int *p1 = &b; //*p2 = &b;
//部分初始化
// int *p3 = &c, *p4;
return 0;
//先定义,后初始化
// int *p5 = &d ;
//空指针
// int *p6 = NULL;
// int *p7 = 0;
//*指针变量
int value = *p1; //注意,这里6.2的Xcode报错, code wil never be executed (代码永远不会执行)
// printf("value = %d\n",a);
printf("%d\n",value);
printf("请");
}
|
|