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

We can do nesting of functions. I tried in GCC.
check this keyword auto does the magic.

int main()

{

func1();

}



func1()

{

int i = 0;

auto func2()

{

i = 10;

printf("Heloo i am func 2\n");

}

printf("Heloo i am func 1\n");

}


However it seems to me that there is no use of doing this
if you want to call func2 you can't do it from out side func1.

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are reserved words?

1047


How can I read in an object file and jump to locations in it?

991


What are the salient features of c languages?

1048


Describe the header file and its usage in c programming?

1019


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2641


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

3186


What is the right way to use errno?

1006


Does free set pointer to null?

955


Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

1601


Tell us two differences between new () and malloc ()?

1119


Why main is used in c?

1014


What is size of union in c?

980


Explain what is wrong with this program statement?

1071


How can I open files mentioned on the command line, and parse option flags?

1017


write a program to rearrange the array such way that all even elements should come first and next come odd

2226