Created
February 14, 2023 22:33
-
-
Save pavly-gerges/e68e4d4f06cc33c90237969f72ad40d1 to your computer and use it in GitHub Desktop.
An example shows a function definition inside another function demonstrating local scopes effect on function definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
static inline void call_stack() { | |
void inside_block() { | |
printf("inside block"); | |
} | |
inside_block(); | |
} | |
int main() { | |
call_stack(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Those are other shapes of local function definitions:
Highly discouraged.