指针的简单printf(“%d”,*x+2)出来,点击去看详细吧,谢谢
# include <stdio.h>int main(void)
{
int i,a[10],*x,*y;
for (i=0;i<10;i++)
{
a[i]=i+1;
printf("%d",a[i]);
}
printf("\n");
x=a,y=&a[5];
printf("%d\n",*x+2);
printf("%d\n",*x++);
printf("%d\n",*x+5);
printf("%d\n",y-x);
return 0;
}
/*
--------------------------------
12345678910
3 ----------------------------->>>>>>> 这边四个箭头,我不懂其中的计算。x=a语言没有懂?是不是
1 ----------------------------->>>>>>> 等于a[0]一个意思?? 那么*x+2,*x+5,他们也就差3个元素??这里答案都是vc++6.0
7 ----------------------------->>>>>>>
4 ----------------------------->>>>>>>
Press any key to continue
*/