Skip to content

Commit

Permalink
ex-nested-function example
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdkiki committed Apr 27, 2024
1 parent 55caf7e commit f922e1a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/ex-nested-function/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <stdio.h>

int main()
{
int main_scope_int = 42;

void nested_func()
{
printf("NESTED FUNCTION %d\n", main_scope_int);
return;
}

printf("MAIN FUNCTION\n");
nested_func();

return 0;
}

0 comments on commit f922e1a

Please sign in to comment.