Computer Science, asked by shreeyakundu05, 24 days ago

predict the output :-
int a=5;

int b=(a/a)%a;

System.out.println(a);​

Answers

Answered by Oreki
7

\textbf{\large Given Snippet}

 \texttt{int a = 5;}\\\texttt{int b = (a / a) \% a;}\\\texttt{System.out.println(a);}

\textbf{\large \symbol{79}utput}

  \texttt{b = (5 / 5) \% 5}\\\texttt{b = 1 \% 5}\\\texttt{b = 1 and a = 5}\\\\\textsf{\boxed{\textsf{\symbol{79}utput - 5}}}

Similar questions