OR and AND operation in C

后端 未结 2 1568
不思量自难忘°
不思量自难忘° 2021-01-05 14:14

I have a doubt in the program below.

int main()
{
    int i = -3,j = 2, k = 0,m;
    m = ++i || ++j && ++k;
    printf(\"%d %d %d %d\\n\", i, j, k, m         


        
2条回答
  •  离开以前
    2021-01-05 14:44

    Nothing after the || is evaluated, since the result of the expression ++i is nonzero.

提交回复
热议问题