While(1)
{

}
when this loop get terminate is it a infinite loop?

Answers were Sorted based on User's Feedback

While(1) { } when this loop get terminate is it a infinite loop?..

it is infinite loop
while(1)
{
break;
}

 Is This Answer Correct ? 15 Yes 3 No

While(1) { } when this loop get terminate is it a infinite loop?..

it is infinite loop.and it will terminate if we will call
break statement in loop.

 Is This Answer Correct ? 11 Yes 3 No

While(1) { } when this loop get terminate is it a infinite loop?..

It is finite loop...
if loop reaches Stack Overflow then it will automatically
terminated....

 Is This Answer Correct ? 8 Yes 1 No

While(1) { } when this loop get terminate is it a infinite loop?..

only break statement can do it

 Is This Answer Correct ? 6 Yes 3 No

While(1) { } when this loop get terminate is it a infinite loop?..

yes, it is infinite loop.
it will terminate after stack overflow occur.

 Is This Answer Correct ? 2 Yes 0 No

More C Interview Questions

Differentiate b/w Modify and Update commands giving example.

Find the O/p of the following struct node { char *name; int num; }; int main() { struct node s1={"Harry",1331}; struct node s2=s1; if(s1==s2) printf("Same"); else printf("Diff"); }

what is c

#include<stdio.h> int SumElement(int *,int); void main(void) { int x[10]; int i=10; for(;i;) { i--; *(x+i)=i; } printf("%d",SumElement(x,10)); } int SumElement(int array[],int size) { int i=0; float sum=0; for(;i<size;i++) sum+=array[i]; return sum; } output?

how to find sum of 5 digits in C?

Write a program in c to print * * * * * *******

write a c program to check weather a particluar bit is set or not?

Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod()

5. What kind of sorting is this: SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]<k[min] min=j; } temp=K[i];K[i]=K[min];K[min]=temp; 3.[Sorted Values will be returned] A)Bubble Sort B)Quick Sort C)Selection Sort D)Merge Sort

what would be the output of the following prog? Justify your answer? main() { unsigned char ch; unsigned char i; ch = -255; printf("%d",ch); i = -1; printf("%d",i); }

#include<stdio.h> int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20