How many times will the following loop execute? What value will be returned?

int x=2;
int y=50;
do{
++x;
y-=x++;
}
while(x<=10);
return y;


Solution



Loop will execute 5 times
15


Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com