This commit is contained in:
Mert Gör
2024-07-26 17:10:07 +03:00
parent 9292974a16
commit e482e0e22b
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#include <stdio.h>
int a;
void foo()
{
int a;
a = 10; // yerel a
printf("%d\n", a);
}
int main()
{
a = 20; // global a
printf("%d\n", a); // 20
foo(); // 10
printf("%d\n", a); // 20
return 0;
}