Computer Science, asked by hozaifaandalib, 1 year ago

If int y=10 then find int z=(++y*(y++ + 5)); plz give me the answer stepwise

Answers

Answered by Anonymous
81
hope u like it....
mark it as brainlist
Attachments:
Answered by lovingheart
32

Answer:

Answer is 176.

Explanation:

In order to solve the given problem, we need to first know about the operator precedence.

• Brackets always take the first precedence

• Increment/ decrement operators (associativity – right to left)

• Arithmetic operator (associativity – left to right)

• Binary operator

• Left and right shift

• Comparison operator

• Bitwise operator

and so on.

As per the given guidelines,

(y++ + 5) -->y++ = 10+1 = 11, 11 + 5 = 16

++y -->1 + 10 = 11

(++y*(y++ + 5)) --> 16 * 11 = 176

Similar questions