Ad

Chapter - 4: The Loop Control Structure

Which of the following is not an infinite loop.


Ad
D
Sections
5
Exercises

1.

int i = 1;
while(1)
{
	i++;
}

2.

for(; ;);

3.

int t = 0,f;
while(t)
{
	f = 1;
}

4.

int y, x = 0;
do
{
	y = x;
}while(x == 0);

Ans: 4

Ad

© 2024 Garbage Valuegarbage value logo