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...

CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION.

Answer Posted / punam

Thank you all. This was helpful to me. So, to summarize all this should I say:
1. In C, we cannot define a function inside another function.
2. However, main() function is an exception as we can define another function inside a main() function. This can be called nesting of function inside main(). The inner function cannot be called from any outside function. It can be called only from main().
3. The only way to access the inner function from outside main() is by passing a function pointer of type inner function.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sizeof array in c?

986


List some of the static data structures in C?

1156


What is use of pointer?

1011


What is a 'null pointer assignment' error?

1162


Why is main function so important?

1047


Is null equal to 0 in sql?

1089


What is the difference between memcpy and memmove?

968


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1626


How do you use a 'Local Block'?

1120


How can I find out how much free space is available on disk?

1014


What is 'bus error'?

1091


Difference between Function to pointer and pointer to function

1019


What are shell structures used for?

984


How is actual parameter different from the formal parameter?

973


What are comments and how do you insert it in a C program?

1198