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.

Answers were Sorted based on User's Feedback



CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION...

Answer / rg

no!!! we cant define a func. inside a func.

Why u some people misguide others!!

go thru practice..

Is This Answer Correct ?    0 Yes 0 No

CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION...

Answer / anil kumar nahak

Yes we define any function(without main()) with in a function.

Is This Answer Correct ?    3 Yes 4 No

CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION...

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

CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION...

Answer / vrushali

Hi friends , it possible.
Please chk this simple program:
#include <stdio.h>

int main ()
{
int func1 ()
{
printf ("\n Inside func 1 ");
}
func1 ();
}
O/P : Inside func 1

Is This Answer Correct ?    9 Yes 17 No

CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION...

Answer / kojo maxwell

yes a function can be defined in a function.
for example;
int main()
{

}
int main is a function and in the curly brackets we could
still have functions.

Is This Answer Correct ?    16 Yes 51 No

Post New Answer

More C Interview Questions

Without using main fn and semicolon,print remainder for a given number in C language

2 Answers  


convert 0.9375 to binary

2 Answers   CTS, TANCET,


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

0 Answers  


Determine the code below, tell me exactly how many times is the operation sum++ performed ? for ( i = 0; i < 100; i++ ) for ( j = 100; j > 100 - i; j--) sum++;

5 Answers   ITCO, Wipro,


which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above

0 Answers  


Why doesn't C support function overloading?

2 Answers  


Explain what header files do I need in order to define the standard library functions I use?

0 Answers  


What are the 5 elements of structure?

0 Answers  


15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?

2 Answers   CTS,


why array index always starts from zero??

4 Answers   TCS,


What do you mean by c what are the main characteristics of c language?

0 Answers  


What is string function c?

0 Answers  


Categories