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

When do we get logical errors?

1067


How do you initialize pointer variables?

1027


What is getch?

1083


What is a structure member in c?

952


What is array in c with example?

1161


Why functions are used in c?

1064


How are 16- and 32-bit numbers stored?

1234


Are there any problems with performing mathematical operations on different variable types?

987


What is the difference between text and binary i/o?

994


Write a program in c to replace any vowel in a string with z?

1069


In C language what is a 'dangling pointer'?

1058


how to execute a program using if else condition and the output should enter number and the number is odd only...

2200


Explain the properties of union. What is the size of a union variable

1124


What is type qualifiers?

1072


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3631