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 is difference between structure and union in c programming?

1097


Write a program to print factorial of given number without using recursion?

990


Is fortran faster than c?

1036


a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list

998


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

1053


What language is windows 1.0 written?

1051


What is the difference between array and pointer in c?

1158


What are the 5 data types?

1125


Why enum is used in c?

949


design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

1965


What is wrong with this code?

1177


what is the diffrenet bettwen HTTP and internet protocol

1832


How do you determine whether to use a stream function or a low-level function?

1122


What is the role of this pointer?

1070


Is return a keyword in c?

1073