question 34\n1 pts\nwhat will be the value of x after the following code is executed?\nint x, y = 15;\nx =…

question 34\n1 pts\nwhat will be the value of x after the following code is executed?\nint x, y = 15;\nx = y--;\n14\n16\n0\n15

question 34\n1 pts\nwhat will be the value of x after the following code is executed?\nint x, y = 15;\nx = y--;\n14\n16\n0\n15

Answer

Explanation:

Step1: Understand post - decrement

In the statement x = y--;, the value of y is first assigned to x, and then y is decremented by 1.

Step2: Initial value assignment

The initial value of y is 15. So, the value of y (which is 15) is assigned to x first. Then y becomes 14.

Answer:

15