From b8d2d91cd685b649fe412c68b4a00de0d171c70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Wed, 30 Oct 2024 08:58:17 +0300 Subject: [PATCH] scope example --- ChangeLog | 2 ++ c-basic/scope.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 c-basic/scope.c diff --git a/ChangeLog b/ChangeLog index 8a6a4a8..40fd64f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2024-10-30 Mert Gör + * c-basic/scope.c (foo): same variable different scopes + * c-basic/C.pdf: page 25,end of the page * c-basic/local_vs_global.c (main): local variable and global variable diff --git a/c-basic/scope.c b/c-basic/scope.c new file mode 100644 index 0000000..67e4a58 --- /dev/null +++ b/c-basic/scope.c @@ -0,0 +1,16 @@ +#include + +void foo() +{ + int a; + { + int a; + } +} + +int main() +{ + int a; + + return 0; +}