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

13 lines
245 B
C
Raw Permalink 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 i = 1;
// i += --i && -5;
// i的结果是多少
#include <stdio.h>
int main()
{
int i = 1;
i += --i && -5; // i = 1 + 0 && -5 = 1 + 0 = 1
// i = ((i + (--i)) && (-5));
printf("i = %d\n", i);
return 0;
}