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
List some of the dynamic data structures in C?
What is the purpose of type declarations?
What is logical error?
What are the 5 types of inheritance in c ++?
The statement, int(*x[]) () what does in indicate?
What is keyword with example?
What is the use of c language in real life?
What is static volatile in c?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
What is the benefit of using const for declaring constants?
What is spaghetti programming?
List some applications of c programming language?
Is it better to bitshift a value than to multiply by 2?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
What will be your course of action for a push operation?