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 The Difference Between Null And Void Pointer?
What is the scope of global variable in c?
What is the difference between memcpy and memmove?
How does pointer work in c?
Give me the code of in-order recursive and non-recursive.
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
How to Throw some light on the splay trees?
Write a program to print ASCII code for a given digit.
What is wrong with this program statement? void = 10;
What is scope rule in c?
What are the 3 types of structures?
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
Why should I prototype a function?
What is an lvalue in c?
Why is c called a mid-level programming language?