Ask Question
23 December, 13:59

If a programming language does not use short-circuit evaluation, what is the output of the following code fragment if the value of myInt is 0? int other = 3, myInt; if (myInt! = 0 && other % myInt! = 0) printf ("other is odd/n"); else printf ("other is even/n");

+3
Answers (1)
  1. 23 December, 15:09
    0
    other is even.

    Step-by-step explanation:

    Since the value of myInt variable is assumed to be 0 and we have other = 3. In the if condition the expression is true only when the myInt is not equal to zero and and the remainder of other/myInt is not equal to zero (%modulus operator provides the remainder). myInt is 0 hence the expression returns false and the else block is executed so it prints other is even.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “If a programming language does not use short-circuit evaluation, what is the output of the following code fragment if the value of myInt is ...” in 📙 Mathematics if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers