Google News
logo
C-Language - Interview Questions
What is the difference between local variable and global variable in C ?
Local variable : A variable which is declared inside function or block is known as local variable.

Global variable :  A variable which is declared outside function or block is known as global variable.

int value=50;//global variable  
void function1(){  
int x=20;//local variable  
}  
Advertisement