自增运算符

mac2022-06-30  28

// // main.c // c自增运算符 // // Created by mac on 2019/4/9. // Copyright © 2019年 mac. All rights reserved. // #include <stdio.h> int main(int argc, const char * argv[]) { int count=1; count++; count=5; int i=8; int y,b=3; y=(++b)+(b++);//8 printf("%d\n",y); printf("%d %d %d %d %d\n",--i,i--,i,i++,++i); //printf("%d\n",i++); return 0; }

输出结果

8 7 7 6 6 8 Program ended with exit code: 0

Tips

没能解决这个问题,不同的编译器会产生不同的输出结果。

转载于:https://www.cnblogs.com/overlows/p/10677712.html

最新回复(0)