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

void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

0 Answers  


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

0 Answers  


What are operators in c?

0 Answers  


How do I swap bytes?

0 Answers  


totally how much header files r in c language

8 Answers   TCS,






Why doesn't C support function overloading?

2 Answers  


Explain what is the difference between text files and binary files?

0 Answers  


What do you mean by command line argument?

0 Answers   TCS,


what is the difference between #include<> and #include”…”?

5 Answers  


parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..

4 Answers  


struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer

0 Answers  


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

0 Answers  


Categories