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 |
What is f'n in math?
what is compiler
How many types of sorting are there in c?
Can we write a program without main() function?
Explain the bubble sort algorithm.
cavium networks written test pattern ..
What is string in c language?
the expression a=30*1000+2768; evalutes to a) 32768 b) -32768 c) 113040 d) 0
Explain how can I manipulate strings of multibyte characters?
how to print this sereis 2 4 3 6 5..........?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
11. Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage