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);

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is volatile c?

1022


largest Of three Number using without if condition?

1603


What are lookup tables in c?

1004


In C language what is a 'dangling pointer'?

1160


What is a far pointer in c?

1047


What is a nested loop?

1129


Explain the ternary tree?

1026


what is the format specifier for printing a pointer value?

1023


What is table lookup in c?

1100


What is a ternary operator in c?

1125


which type of aspect you want from the student.

2164


What is a double c?

988


difference between Low, Middle, High Level languages in c ?

2085


List the different types of c tokens?

1074


What are directives in c?

974