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 difference between structure and union in c programming?
Write a program to print factorial of given number without using recursion?
Is fortran faster than c?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
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?
What language is windows 1.0 written?
What is the difference between array and pointer in c?
What are the 5 data types?
Why enum is used in c?
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.
What is wrong with this code?
what is the diffrenet bettwen HTTP and internet protocol
How do you determine whether to use a stream function or a low-level function?
What is the role of this pointer?
Is return a keyword in c?