1.

Analyse the following program segment and determine how many times the loop will be executed and what will be the output of the program segment. int k=1 ,i=2; while(++i<6) k*=i; System.outprintln(k);

Answer»

After analyzing the code it was observed that the loop executed 3 times and the output is 60.



Discussion

No Comment Found

Related InterviewSolutions