You cannot define a function within another function in standard C.
You can declare a function inside of a function, but it’s not a nested function.
gcc has a language extension that allows nested functions. They are nonstandard, and as such are entirely compiler-dependent.
More Related Contents:
- Procedure to include own functions to ANSI C Standard library
- How do I modify a pointer that has been passed into a function in C?
- Default argument promotions in C function calls
- C Programming: malloc() inside another function
- Difference between passing array and array pointer into function in C
- How do you pass a function as a parameter in C?
- Why does a C-Array have a wrong sizeof() value when it’s passed to a function? [duplicate]
- Function pointers and address of a function
- Alternative (K&R) C syntax for function declaration versus prototypes
- Allocate memory 2d array in function C
- Returning a pointer to an automatic variable
- What is this strange function definition syntax in C? [duplicate]
- What does ‘sizeof (function name)’ return?
- Nested strtok function problem in C [duplicate]
- C – allocating a matrix in a function
- Function Returning Itself
- Changing array inside function in C
- undefined reference when calling inline function
- Strange warning in a C function const multidimensional-array argument
- in c: func(void) vs. func() [duplicate]
- How to return matrix (2D array) from function? (C)
- What is the reason function names are prefixed with an underscore by the compiler?
- No defined type of a function parameter defaults to int? Am I insane?
- How to use the rand function to make numbers in a specific range?
- Avoiding the main (entry point) in a C program
- How can I create C header files [closed]
- In C, what is the difference between `&function` and `function` when passed as arguments?
- Counting words in a string – c programming
- In a C function declaration, what does “…” as the last parameter do?
- What is the function of an asterisk before a function name?