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
What is a wrapper function in c?
Did c have any year 2000 problems?
What is the use of getchar functions?
What is the use of a semicolon (;) at the end of every program statement?
How can you increase the size of a dynamically allocated array?
What are pointers in C? Give an example where to illustrate their significance.
What are the 4 types of functions?
What is the difference between %d and %i?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
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.
What are header files? What are their uses?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
What is the most efficient way to store flag values?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
What is function prototype in c language?