c语言的++

#include <stdio.h>

int main(){



  int i = 1;
    printf("%d,%d\n", ++i, ++i);    //3,3
    printf("%d,%d\n", ++i, i++);    //5,3
    printf("%d,%d\n", i++, i++);    //6,5
    printf("%d,%d\n", i++, ++i);    //8,9

	return 0;
}

有些编译器会打印出

2 3
4 4
5 6
7 9

猜你喜欢

转载自blog.csdn.net/k3108001263/article/details/84531066