指针见解

#include<stdio.h>
int main()
{char str[80],*p;
p=str;
/*printf("%d%d",p,str);
scanf("%s",p);//不能用*p,因为*p相当于a【0】。 而str只相当于一个首地址。 
printf("%s",str);*/
/*scanf("%c",*(p+1));//指针不能被赋值。 
printf("%c",*(p+1));*/
/*scanf("%c",p+1);可以直接这样,赋值给该地址指向的房间*/  
return 0;
 } 

猜你喜欢

转载自blog.csdn.net/qq_43813373/article/details/85222374