Ask Question
7 April, 08:27

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");

+5
Answers (1)
  1. 7 April, 11:04
    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?
Find 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 you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers