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){
....
}

Answer Posted / shruti

a.

while (1) is an infinite loop..

Is This Answer Correct ?    3 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are enumerated types?

644


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15480


What will the preprocessor do for a program?

578


How do I use void main?

621


How can I recover the file name given an open stream?

547






What is the c language function prototype?

639


How can you pass an array to a function by value?

597


What is a function simple definition?

604


What is define c?

565


What is c++ used for today?

654


Why do we use pointer to pointer in c?

587


Explain the use of function toupper() with and example code?

646


How will you write a code for accessing the length of an array without assigning it to another variable?

611


What is the difference between fread and fwrite function?

629


Which is the best website to learn c programming?

571