Computer Science, asked by amriet, 6 months ago

If a=8, b=9 calculate the result for given expression a+=a++ - ++b +a
options are:-
-2
-3
15
-15​

Answers

Answered by Oreki
1

\textsf{Given Expression}

  \texttt{int a = 8, b = 9;}\\\texttt{a += a++ - ++b + a;}

\textsf{Answer}

  \texttt{a += a++ - ++b + a}\\\texttt{a = a + (a++ - ++b + a)}\\\texttt{a = 8 + (8 - 10 + 9)}\\\texttt{a = 8 + (7)}\\\\\boxed{\texttt{a = 15}}

Similar questions