第1个回答 2012-03-18
将m的地址传给指针变量r
给你一个程序说明一下:
#include<stdio.h>
int main()
{
int a=0,b=1;
char c='A';
int *pa=&a,*pb=&b;
char *pc=&c;
printf("a is %d,&a is %p,pa is %p,*pa is%d\n",a,&a,pa,*pa);
printf("b is %d,&b is %p,pb is %p,*pb is%d\n",b,&b,pb,*pb);
printf("c is %d,&c is %p,pc is %p,*pc is%d\n",c,&c,pc,*pc);
return 0;
}
运行结果:
a is 0,&a is 0023FF74,pa is 0023FF74,*pa is 0
B is 1,&B is 0023FF70,pa is 0023FF70,*pa is 1
C is A,&C is 0023FF6F,pa is 0023FF6F,*pa is A
明白了吗,看输出语句,*pa就是输出内容,pa是输出A的地址本回答被提问者和网友采纳