Welcome Guest.


C language results

Asked by: Brian Johnson 219 views IT October 27, 2018

Thank you for detailed steps and results!

2 Answers

  1. +4Votes  

    Hello, there is no step at all. It’s very simple. The test site is the combination of operators. The important point of this question is: short-circuit rule of ||

    A||B is   true or true  means that AB has a true result and is true. If A is 1, it will not calculate B. This is called the short-circuit rule.

    X++;   This is the first to use X  then X+1

    The other point is   Zero is true.

    So only j++ is evaluated, so the output is j=1+1, the others are unchanged.

    Answer: The picture shows the result.

    Question: || and && Which priority is higher? Which one counts first.

    Scott Harrison- October 27, 2018 |

  2. +3Votes  

    Like the big brothers upstairs

    Joshua Allen- October 28, 2018 |