(v) How many times will the following loop execute? Write the output of the code:
int x=10;
while (true)
{
System.out.println (x++ * 2);
if (x%3==0)
break;
}


Solution



Loop is executed two times
20
22



Reach Us

SERVICES

  • ACADEMIC
  • ON-LINE PREPARATION
  • FOUNDATION & CRASH COURSES

CONTACT

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 91790552 9739