Computer Science, asked by dk04897, 3 months ago

write the output of if a=2,b=4 then find c=++a +b- - *(a++ +b)​

Answers

Answered by Oreki
1

\textsf{\large \textbf{Given Snippet}}

    \texttt{c = ++a + b-- * (a++ +  b);}\\\texttt{\hspace{9em} (where initially, a = 2 and b = 4)}

\textsf{\large \textbf{After Execution}}

   \texttt{c = ++a + b-- * (2 + 4); (as a = 2 and b = 4)}\\\texttt{ -> 3 + 4 * (2 + 4);}\\\texttt{ -> 3 + 4 * 6}\\\texttt{ -> 3 + 24}\\\therefore \texttt{  c = 27}

Similar questions