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

which of the following is a example of parallel lines
The Brown Chest by John Updike (excerpt) The full contents of the chest never came quite clear, perhaps because he didn't want to know. His parents' college dip
Find the product of 40.1 and 34 using any method.
what is the central argument presented in the declaration of independence
What advantage did the five nations of the Iroquois have in the seventeenth century
Explain the importance of concentration as it pertains to a solution
Which two numbers add up to -11 that multiply to -432?
add together 2350mm 3.42cm 11/2m and 1.45m
what is the area of 16 squares
What caused world war 2?