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
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 |
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 |
Answer / vaibhav
it's 'b'
becoz for for loop we initialise atleast one statement
| Is This Answer Correct ? | 2 Yes | 13 No |
create a C program that displays one z,two y's,three x's until twenty six A's. plzz answer i need it tomorrow.
Write a program in c to print 1 121 12321 1234321 123454321
11 Answers ANR, College School Exams Tests, Mu Sigma, Wipro,
What is difference between scanf and gets?
Why can’t we compare structures?
what is the output of the following program and explain the answer #include<stdio.h> exp() { main(5) } main(int a) { printf("%d",a); return; }
What is the difference between char array and char pointer?
how to make c program without a libary? e.g.#include<stdio.h> libary is not in c progaram.
What is boolean in c?
What is memory leak in c?
What are the primitive data types in c?
what is pointer?
13 Answers HCL, TCS,
Magic square