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

13 lines
310 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 请计算,【提示】考虑运算符优先级 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;
}