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 are reserved words?
How can I read in an object file and jump to locations in it?
What are the salient features of c languages?
Describe the header file and its usage in c programming?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What is the right way to use errno?
Does free set pointer to null?
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.
Tell us two differences between new () and malloc ()?
Why main is used in c?
What is size of union in c?
Explain what is wrong with this program statement?
How can I open files mentioned on the command line, and parse option flags?
write a program to rearrange the array such way that all even elements should come first and next come odd