jbrad1322 jbrad1322
  • 04-07-2019
  • Computers and Technology
contestada

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

Respuesta :

PhantomWisdom PhantomWisdom
  • 12-07-2019

Answer:

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.

Answer Link

Otras preguntas

How many languages and dialects are there in india?
When did the great depression end
Why did the federalist controlled congress pass alien sedition acts
Why is porcelain often called china?
What is a negative effect of imperialism that can still be seen today? Former British colonies now belong to the British Commonwealth. Many former colonies re
eight things i look forward to this year
Which structure would be unaffected by the peripheral nervous system
After an hour on the expressway, your passengers need to use the restroom and they want to get some food. As you approach the next exit, what color sign will yo
How did Paul Laurence Dunbar depart from traditional poetry in we wear the mask
Determine whether a triangle can be formed with the given side lengths. If so, use Heron's formula to find the area of the triangle a = 240 b = 121 c = 302