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 |
List the difference between a 'copy constructor' and a 'assignment operator' in C?
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?
What is const volatile variable in c?
what is used instead of pointers in java than c?
what is the maximum limit of row and column of a matrix in c programming. in linux .
what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,z; z=x-- -y; printf("\n%d %d %d",x,y,z); }
if the total selling price of 15 items and the total profit earned on them is input through the keyboard, write a program to find the cost price of one of the item
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What is call by reference in functions?
What is a struct c#?
Write a routine that prints out a 2-D array in spiral order!
How to implement call back functions ?