i++,++i一直混淆,便于以后的查询

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/idealcitier/article/details/88397442
#include<stdio.h>
int main(){
    int i = 0;
    int j = 0;
    printf("now i = 0, j = 0\n");
    printf("i++ = %d\n", i++);
    printf("i = %d\n", i);

    printf("++j = %d\n", ++j);
    printf("j = %d\n", j);

    return 0;
}
➜  test ./a.out
now i = 0, j = 0
i++ = 0
i = 1
++j = 1
j = 1

猜你喜欢

转载自blog.csdn.net/idealcitier/article/details/88397442
i++