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 build process in c?
There seem to be a few missing operators ..
What is string function c?
What is meant by high-order and low-order bytes?
What do you mean by dynamic memory allocation in c?
What is the newline escape sequence?
What are the types of pointers in c?
What is a good way to implement complex numbers in c?
What are the similarities between c and c++?
Explain what are multidimensional arrays?
Explain how do you convert strings to numbers in c?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
What is the use of gets and puts?
Explain what is the best way to comment out a section of code that contains comments?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?