#include struct ord { int x,y;} dt[2]={1,2,3,4}; main() {struct ord *p=dt; printf("%d,",++#includestruct ord {int x,y;} dt[2]={1,2,3,4};main(){struct ord *p=dt;printf("%d,",++p->x);printf("%d,",++p->y);}++p->x++p->y

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 01:38:43
#include struct ord { int x,y;} dt[2]={1,2,3,4}; main() {struct ord *p=dt; printf(x);printf("%d,",++p->y);}++p->x++p->y" />

#include struct ord { int x,y;} dt[2]={1,2,3,4}; main() {struct ord *p=dt; printf("%d,",++#includestruct ord {int x,y;} dt[2]={1,2,3,4};main(){struct ord *p=dt;printf("%d,",++p->x);printf("%d,",++p->y);}++p->x++p->y
#include struct ord { int x,y;} dt[2]={1,2,3,4}; main() {struct ord *p=dt; printf("%d,",++
#include
struct ord
{
int x,y;} dt[2]={1,2,3,4};
main()
{struct ord *p=dt;
printf("%d,",++p->x);
printf("%d,",++p->y);
}
++p->x
++p->y

#include struct ord { int x,y;} dt[2]={1,2,3,4}; main() {struct ord *p=dt; printf("%d,",++#includestruct ord {int x,y;} dt[2]={1,2,3,4};main(){struct ord *p=dt;printf("%d,",++p->x);printf("%d,",++p->y);}++p->x++p->y
取值运算的优先级高于++
++p->x
++p->y
的含义等同于
++(p->x)
++(p->y)
前缀++,--与后缀++,--的区别在于
++i时,i=i+1,既i自增之后使用i
而i++表示,i=i,i=i+1既先使用i,然后i自增1