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 the two types of functions in c?

0 Answers  


What is a struct c#?

0 Answers  


Which built-in library function can be used to match a patter from the string?

0 Answers  


What is void pointers in c?

0 Answers  


write a program to produce the following output; ABCDEFGFEDCBA ABCDEF FEDCBA ABCDE EDCBA ABCD DCBA ABC CBA AB BA A A

17 Answers   ABC, College School Exams Tests,






What is c method?

0 Answers  


Explain this code. #include <stdio.h> void f1(int *k) { *k = *k + 10; } main ( ){ int i; i = 0; printf (" The value of i before call %d \n", i); f1 (&i); printf (" The value of i after call %d \n", i); }

3 Answers   IBM,


What is static function in c?

0 Answers  


What is #define used for in c?

0 Answers  


What is the size of a union variable?

0 Answers  


What are all different types of pointers in c?

0 Answers  


When should volatile modifier be used?

0 Answers  


Categories