Ask Question
3 May, 16:20

What is the value of x after the following statements execute? int x, y, z; y 12; z 3; X = (y * (z+y-10); A. 36 B. 144 C. 60 D. None of these

+3
Answers (1)
  1. 3 May, 17:21
    0
    60

    Explanation:

    According to the operator precedence, the bracket comes in the top. So, the program solve expression in the bracket first.

    In the code, the value of Y is 12 and z is 3

    substitute the value in the formula.

    X = (12 * (3 + 12 - 10)).

    So, the program calculate the value (3 + 12 - 10) first which gives 5.

    After that program evaluate (12 * 5) which gives 60.

    Therefore, the answer is 60.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “What is the value of x after the following statements execute? int x, y, z; y 12; z 3; X = (y * (z+y-10); A. 36 B. 144 C. 60 D. None of ...” in 📘 Computers and Technology 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