Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

Answer / jai

printf() will never be executed since for() is an infinite
loop.

Is This Answer Correct ?    30 Yes 2 No

int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

Answer / vikramanj

int i=10[;]
main()
{
int i=20,n;
for(n=0;n<=i;)
{
int i=10[;]
i++;
}
printf("%d", i);
The syntax errs r specified in sq.braces..
if its corrected there s no terminating condition also..
so no o/p..

Is This Answer Correct ?    8 Yes 0 No

int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

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

int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

Answer / dips

it doesnt have any terminating condition so it will be
infinite loop ,no output

Is This Answer Correct ?    4 Yes 0 No

int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

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

int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d&quo..

Answer / guest

i=20

Is This Answer Correct ?    2 Yes 10 No

Post New Answer

More C Interview Questions

How to print India by nested loop? I IN IND INDI INDIA

4 Answers   NIIT, Wipro,


how to add our own function in c library please give details.?

1 Answers   TCS,


What is the difference between variable declaration and variable definition in c?

0 Answers  


In a switch statement, explain what will happen if a break statement is omitted?

0 Answers  


the output will be #include<stdio.h> int main () { int i; i = 9/2; printf("%i",i); return 0; }

4 Answers   CMC, TCS,


Given a piece of code int x[10]; int *ab; ab=x; To access the 6th element of the array which of the following is incorrect? (A) *(x+5) (B) x[5] (C) ab[5] (D) *(*ab+5} .

2 Answers   Oracle,


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

0 Answers   TCS,


main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); }

4 Answers   CitiGroup,


What are multidimensional arrays?

0 Answers  


Difference between for loop and while loop?

1 Answers  


How is actual parameter different from the formal parameter?

0 Answers  


C,c++, Java is all are structural oriented or procedure oriented language..?

6 Answers  


Categories