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

Explain 'bus error'?

1167


Why do we need arrays in c?

1217


How do you define structure?

1093


what is recursion in C

1117


Why can’t constant values be used to define an array’s initial size?

1442


Why header files are used?

1169


What Is The Difference Between Null And Void Pointer?

1336


Explain what is wrong in this statement?

1179


hi any body pls give me company name interview conduct "c" language only

2325


write a program to display all prime numbers

2024


Why do we use pointer to pointer in c?

1142


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

16925


Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record

5270


Is c compiled or interpreted?

1251


Why are algorithms important in c program?

1174