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 |
What is #error and use of it?
What is the use of the sizeof operator?
Write a program which calculate sum of several number and input it into an array. Then, the sum of all the number in the array is calculated.
Write a program to generate prime factors of a given integer?
What is function pointer c?
main() { clrscr(); } clrscr();
why u join this call center?
what will be the out put. #include<stdio.h> void main() { printf("Output:"); printf(1+"vikashpatel"); }//output: ikashpatel
What is variable in c example?
How will you allocate memory to a double pointer ?
write a program to add two numbers of any size.....(remember any size)
What are the features of c languages?