Page 1 of 1

How many times the below loop will get executed? int input =20; while ( input ==20) \{ input++; \} infinite never once 2

Posted: Thu Jul 14, 2022 2:28 pm
by answerhappygod
How Many Times The Below Loop Will Get Executed Int Input 20 While Input 20 Input Infinite Never Once 2 1
How Many Times The Below Loop Will Get Executed Int Input 20 While Input 20 Input Infinite Never Once 2 1 (39.44 KiB) Viewed 37 times
How many times the below loop will get executed? int input =20; while ( input ==20) \{ input++; \} infinite never once 20 times QUESTION 2 What is the output of the program (assume there are no syntax and compile errors)? int i=5; int j=i; if (i==j&&j==5) if (il=5) System.out.println("i and j equal"); else System.out.println("i and j NOT EQUAL"); i and j equal Both the output i and j NOT EQUAL No output