int i =10
main()
{
int i =20,n;
for(n=0;n<=i;)
{
int i=10
i++;
}
printf("%d", i);
Answers were Sorted based on User's Feedback
Answer / jai
printf() will never be executed since for() is an infinite
loop.
| Is This Answer Correct ? | 30 Yes | 2 No |
Answer / vignesh1988i
it will not print i value at all , since the loop is always
true for all cases. since the termination condition is
depending upon n&i,always n<=i, what ever possibe positive
value greater than zero ,it may be.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / dips
it doesnt have any terminating condition so it will be
infinite loop ,no output
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / guest
the print would be 20.
the problem is about scope. the first i=10 is global scope.
But inside main() comes function scope. So i=20. The i
inside the for loop is of block scope and does not affect
the i outside it.
| Is This Answer Correct ? | 5 Yes | 9 No |
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
What is c basic?
How can I read/write structures from/to data files?
what is memory leak?
What is the function of this pointer?
0 Answers Agilent, ZS Associates,
write a program for the normal snake games find in most of the mobiles.
What is keyword in c?
How can I manipulate individual bits?
What are extern variables in c?
What happens if you free a pointer twice?
What is the difference between volatile and const volatile?
what is ur strangth & weekness
0 Answers Cognizant, LG Soft, NetEnrich,