qfedu-c-level/day5/homework/h3.c

13 lines
310 B
C
Raw Permalink Normal View History

2023-07-08 16:16:58 +08:00
// 请计算,【提示】考虑运算符优先级 int n = 0, m = 1;
// m = n++, n++, n++, m++;
// 问n, m分别为多少
#include <stdio.h>
int main()
{
int n = 0, m = 1;
// m = n++;
m = n++, n++, n++, m++; // m = 0 , 然后 m++, m = 1
printf("n = %d, m = %d\n", n, m);
return 0;
}