Chinaunix首页 | 论坛 | 博客
  • 博客访问: 234252
  • 博文数量: 69
  • 博客积分: 1415
  • 博客等级: 上尉
  • 技术积分: 570
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-13 16:57
文章分类

全部博文(69)

文章存档

2011年(1)

2010年(5)

2009年(63)

我的朋友

分类: C/C++

2009-05-06 22:42:50

////////////////////////////////////
#include
#include
int main()
{
int a[10]={0,1,2,3,4,5,6,7,8,9};
int *p=a;
printf("%d\n",*p++);
printf("%d\n",*p);
}


>gcc test.c -o a.out
>./a.out
0
1

*p++相当于*(p++) 但++在后,所以先取了*p,后++
*++p则相反。
///////////////////////////////////////////////////////
阅读(1352) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~