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's a "sequence point"?

3 Answers  


main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }

9 Answers   TCS,


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

0 Answers   Zoho,


Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4

2 Answers   Mascot,


What is the difference between array and pointer in c?

0 Answers  






What is a stream water?

0 Answers  


how to sort two array of characters and make a new array of characters.

1 Answers   Accenture,


What is a global variable in c?

0 Answers  


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

0 Answers  


Can you please compare array with pointer?

0 Answers  


suppose we use switch statement and we intilize years name using enum statement like(jan,feb,mar,------dec) we take integer value as an input .question is that the month which we analyz is from 0 to 11 bt if i enter 12 than how he again starts from begning and print jan

1 Answers  


provide an example of the Group by clause, when would you use this clause

0 Answers  


Categories