1) What will be the value of x after the following code is
executed?
int x = 10;
while (x < 100);
{
x += 10;
}
A) 90
B) 100
C) 110
D) This is an infinite loop.
1) What will be the value of x after the following code is
executed?
int x = 10;
while (x < 100);
{
x += 10;
}
A) 90
B) 100
C) 110
D) This is an infinite loop.
2) What will be the value of x after the following code is
executed?
int x = 10, y = 20;
while (y < 100)
{
x += y;
y += 20;
}
A) 90
B) 110
C) 130
D) 210
I know the answers but I need an explanation,
please..................
1)D
2)D
1) What will be the value of x after the following code is executed? int x = 10; while (x < 100); { x += 10; } A) 90 B)
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am