Computer Science, asked by Abbasss, 6 hours ago

What will be the result of the following expression? [2] int a=2; a = a ++ + a;​

Answers

Answered by praveshkumarbhati
0

Answer:

a+= a++ + ++a + --a + a--

⇒ a = a + (a++ + ++a + --a + a--)

⇒ a = 7 + (7 + 9 + 8 + 8)

⇒ a = 7 + 32

⇒ a = 39

Explanation:

a+= a++ + ++a + --a + a--

⇒ a = a + (a++ + ++a + --a + a--)

⇒ a = 7 + (7 + 9 + 8 + 8)

⇒ a = 7 + 32

⇒ a = 39

Similar questions