update
This commit is contained in:
		@@ -1,3 +1,9 @@
 | 
			
		||||
2024-07-26  hwpplayer1  <hwpplayer1@debian>
 | 
			
		||||
 | 
			
		||||
	* c-basic/C.pdf: Fonksiyonların Parametre Değişkenleri page 27
 | 
			
		||||
 | 
			
		||||
	* c-basic/global_variable_2.c (main): global variable and local variable example
 | 
			
		||||
 | 
			
		||||
2024-07-17  hwpplayer1  <hwpplayer1@debian>
 | 
			
		||||
 | 
			
		||||
	* c-basic/C.pdf: Global Değişkenlerin Faaliyet Alanı sayfa 26
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								c-basic/global_variable_2.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								c-basic/global_variable_2.c
									
									
									
									
									
										Normal 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;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user