x++和--x运行出来的结果为什么是一样的
#include <stdio.h>
int main()
{
int x = 100;
printf("x=%d\n",--x); //得出99
printf("x=%d\n",x++); //得出99
printf("x=%d\n",x);
printf("x=%d\n",x);
printf("x=%d\n",x);
printf("x=%d\n",--x);
return 0;
}
#include <stdio.h>
int main()
{
int x = 100;
printf("x=%d\n",--x); //得出99
printf("x=%d\n",x++); //得出99
printf("x=%d\n",x);
printf("x=%d\n",x);
printf("x=%d\n",x);
printf("x=%d\n",--x);
return 0;
}
2018-05-26
举报