LOCAL AND GLOBAL VARIABLES LOCAL VARIABLE :- Variable that are declared inside the function is called local variable.These variable are also referred to as automatic variables. Local variable are referred only by statement that are declared inside the block in which the variable are declared. simple program for local variable #include<stdio.h> #include<conio.h> void main( ) { int x,y; /* this is local variable*/ clrscr( ); printf("enter two number \n"); scanf("%d %d",&x,&y0; getch( ); } GLOBAL VARIABLE :- The variable declared outside the function are called global variables.They will hold their value throughout the program's execution. you create global variables by declaring them outside of all function. simple program of global variable #include<stdio.h> #include<conio.h> int a ; ...
this blog is for c programming language. in this blog have very important notes are available. Which help you for theory. I hope you like it. In this blog I will explain how to execute the program and how it work in compiler,linking section.