#include<stdio.h>
#include<stdlib.h>
int main(){
int *z(int *p); //指针作为函数参数
int **p; //指向指针的指针
//**(int)p 首先括号与int结合 对p进行强制转换 此时就是一个整型变量 但是在变量前加*运算符 是错误的
int b = 0;
int *c;
c = &b; //c->b
p = &c; //p->c
z(c);
printf("%d\n",b);
printf("%d\n",**p);
return 0;
}
int* z(int *p){
*p = *p + 1;
printf("指针作为函数参数:%d\n", *p);
return p;
}
|