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 |
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
wat is the output int main() { char s1[]="Hello"; char s2[]="Hello"; if(s1==s2) printf("Same"); else printf("Diff"); }
#include<stdio.h> #include<conio.h> # define swap(a,b) temp=a; a=b; b=temp; void main( ) { int i, j, temp; i=5; j=10; temp=0; if( i > j) swap( i, j ); printf( "%d %d %d", i, j, temp); }
What is the scope of static variables?
What is the meaning of ?
is forign key will be unique key any table or not?
Write a c program to demonstrate Type casting in c?
What are the primitive data types in c?
write a function which accept two numbers from main() and interchange them using pointers?
main() {int a=200*200/100; printf("%d",a); }
What does d mean?
What is static function in c?