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
What is data structure in c programming?
what does static variable mean?
What is extern storage class in c?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
Write a program on swapping (100, 50)
How does struct work in c?
What are inbuilt functions in c?
How can you invoke another program from within a C program?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
How can you determine the maximum value that a numeric variable can hold?
Is register a keyword in c?
What is the difference between new and malloc functions?
What is a null string in c?
How many bytes are occupied by near, far and huge pointers (dos)?
Calculate 1*2*3*____*n using recursive function??