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 |
Why the use of alloca() is discouraged?
shorting algorithmS
write a 'c' program to sum the number of integer values
what is the difference between class and unio?
print the palindrome numbers in between 0 to n
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
write a program which will count occurance of a day between two dates.
Explain what header files do I need in order to define the standard library functions I use?
what is pointer ? what is the use of pointer?
Differentiate between a for loop and a while loop? What are it uses?
write a program in reverse the string without using pointer,array,global variable declaration,lib fun only using a function?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?