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

Write a program to use switch statement.

1136


What is meant by recursion?

1054


why return type of main is not necessary in linux

2111


State the difference between x3 and x[3].

1112


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

1196


What is the size of structure in c?

1161


How do you list files in a directory?

1146


What is hashing in c language?

1322


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

1365


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

3584


Explain what is the benefit of using enum to declare a constant?

1096


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

1006


How do shell structures work?

1120


Explain what are multidimensional arrays?

1072


What is sizeof array in c?

1062