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 two elements have the most similar chemical properties? (1) Be and Mg (3) Cl and Ar (2) Ca and Br (4) Na and P
An iron bar at 325 K is placed in a sample of water. The iron bar gains energy from the water if the temperature of the water is (1) 65 K (3) 65°C (2) 45 K (4)
Please Help! Don't remember going over this! What activates a convection current, starting the flow of a fluid? A. cold temperatures at the north pole B. heated
Which type of bonding is found in all molecular substances? (1) covalent bonding (3) ionic bonding (2) hydrogen bonding (4) metallic bonding
What is the 5th layer of the Earth
When does the next space shuttle launch?
what is 4k+44=10k-10
How do consumer expectations affect demand?
a car travels 100 meters in 4.0 seconds. Find the average velocity
At room temperature, a mixture of sand and water can be separated by (1) ionization (3) filtration (2) combustion (4) sublimation