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 meant by realloc()?

1165


What is operator promotion?

1086


what is the diffrenet bettwen HTTP and internet protocol

1844


Why is not a pointer null after calling free?

1031


What are the two forms of #include directive?

1172


What is a rvalue?

1211


What is wrong with this program statement? void = 10;

1264


What are the different types of linkage exist in c?

1035


What is extern c used for?

1069


What do the functions atoi(), itoa() and gcvt() do?

1198


How many data structures are there in c?

1133


What is meant by type specifiers?

1142


What will the preprocessor do for a program?

1085


Add Two Numbers Without Using the Addition Operator

833


Which header file is essential for using strcmp function?

1491