for(i=1;i>0;i++);
printf("i=%d",i);
what will be the answer????
Answer Posted / vignesh1988i
since after the loop there is a semicolon , so according to
the compiler this semicolon will be taken as next line and
the loop will be iterating till the termination condition....
output possibilities :
1)if the variable 'i' which is used as an signed integer
variable , this will take an infinite values and stop at one
instance and it will terminate the application. but wont
display anything in the screen
2) if this is an unsigned variable this will be infinite
with values going on and on without stopping.. but not
displaying it...
conclusion : loop is infinite here.....
thank u
| Is This Answer Correct ? | 12 Yes | 8 No |
Post New Answer View All Answers
Why is structure padding done in c?
Explain what are bus errors, memory faults, and core dumps?
How to throw some light on the b tree?
Do you have any idea about the use of "auto" keyword?
Why can’t we compare structures?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
How can you pass an array to a function by value?
What are two dimensional arrays alternatively called as?
Why is not a pointer null after calling free?
What is the heap in c?
Can one function call another?
What is the difference between near, far and huge pointers?
C language questions for civil engineering
Why do we use stdio h and conio h?
What is array in c with example?