Which of the following is not an infinite loop ?
a.while(1){
....
}
b.for(;;){
...
}
c.x=0;
do{
/*x unaltered within theloop*/
...
}while(x==0);
d.# define TRUE 0
...
while(TRUE){
....
}

Answers were Sorted based on User's Feedback



Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ..

Answer / deepa

d

Is This Answer Correct ?    44 Yes 2 No

Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ..

Answer / krishna kumar

ya deepa is ryt.
true here equals zero...which is false.
so the correct answer is D.

Is This Answer Correct ?    23 Yes 3 No

Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ..

Answer / prem

Hai Deepa,You are Absolutely right.d is the right

Is This Answer Correct ?    8 Yes 0 No

Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ..

Answer / balu

yes.. deepa is right.. all are infinite loops except d. so d
is the answer

Is This Answer Correct ?    7 Yes 1 No

Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ..

Answer / ramya

its d.

Is This Answer Correct ?    4 Yes 3 No

Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ..

Answer / shruti

a.

while (1) is an infinite loop..

Is This Answer Correct ?    3 Yes 9 No

Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ..

Answer / vaibhav

it's 'b'
becoz for for loop we initialise atleast one statement

Is This Answer Correct ?    2 Yes 13 No

Post New Answer

More C Interview Questions

What are shell structures used for?

0 Answers  


Can a pointer point to null?

0 Answers  


What does dm mean sexually?

0 Answers  


What is the importance of c in your views?

0 Answers  


differnce between do and do while

3 Answers   DOEACC,






Explain what standard functions are available to manipulate strings?

0 Answers  


wat is the meaning of c?

9 Answers   CTS, IBM, Wipro,


hi how to convert program from notepad to turboc editor can u please help me

3 Answers  


Why c is called procedure oriented language?

0 Answers  


what would be the output of the follwing struct st { char name[20]; int i; float f; }; main() { struct st emp = {"forum"}; printf("%d %f",emp.i,emp.f); }

4 Answers  


how to connect oracle in C/C++.

3 Answers   TCS, Wipro,


What's wrong with "char *p; *p = malloc(10);"?

5 Answers  


Categories