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 |
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
What are operators in c?
How do I swap bytes?
totally how much header files r in c language
Why doesn't C support function overloading?
Explain what is the difference between text files and binary files?
What do you mean by command line argument?
what is the difference between #include<> and #include”…”?
parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?