i++和++i的区别
#include <studio.h>
int main() {
int i,x;
i = 1;
x = 1;
x = i ++; //先让x变成i的值1,再让i加1
print("%d", x); //x=1
print("%d", i); //i=2
i = 1;
x = 1;
x = ++i; //先让i加1, 再让x变成i的值2
print("%d", x); //x=2
print("%d", i); //i=2
}
i++.
原创
2020-06-09 16:40:53 ·
272 阅读 ·
0 评论