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
In C programming, how do you insert quote characters (‘ and “) into the output screen?
What is dynamic dispatch in c++?
How can a program be made to print the line number where an error occurs?
What is wild pointer in c?
What is meant by keywords in c?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
What is the scope of global variable in c?
What does *p++ do? What does it point to?
What is the scope of an external variable in c?
What is call by value in c?
What are the two types of functions in c?
Linked lists -- can you tell me how to check whether a linked list is circular?
number of times a digit is present in a number
What is an lvalue in c?
Why do we use & in c?