Computer Science, asked by sudhasekar05, 2 months ago

Evaluate the following: If a=10, b=17, c=0; c=((a+b)==(b+10) ? a : b;​

Answers

Answered by Oreki
4

\textsf{\bf\large Given Snippet}

  \texttt{int a = 10, b = 17, c;}\\\texttt{c = (a + b) == (b + 10) ? a : b;}

\textsf{\bf\large After Execution}

  \texttt{c = (10 + 17) == (17 + 10) ? 10 : 17;}\\\texttt{\hspace{.5em} As, 27 == 27 is \textit{true},}\\\texttt{Finally, \boxed{\tt c = 10}}

Similar questions