codey modey
codey modey

Reputation: 983

Regarding nested function in C

The following link mentions that nested functions do not exist in C

Nested function in C

In following file function mini_vsnprintf has nested functions

https://github.com/mludvig/mini-printf/blob/master/mini-printf.c

Q: Do nested functions really exist in C?

Upvotes: 0

Views: 90

Answers (1)

Jonathan Leffler
Jonathan Leffler

Reputation: 754420

Standard C does not support nested functions.

GCC does support nested functions.

Generally, don't use nested functions if you want your code to be portable.

Upvotes: 5

Related Questions