Variables In C Language

Variables In C Language

Variable in C Programming are the place to store the data. Variable name may have different data types to identify the type of value stored. 

Example :
int a ; 
Here a is the variable name and it’s data type is integer type. You will learn more on it soon. Variable is considered as one of the building block of C Programming which is also called as identifier. A Variable is a name given to the memory location where the actual data is stored.
Types of variable in C :

  • Local Variables
  • Global Variables

What are Local Variables ?
Local Variable is Variable having Local Scope. They are accessible only from function or block in which it is declared. Local variable is given Higher Priority than the Global Variable.

What are Global Variables ?

Global Variables are variables that is Globally available. Global variables are accessible throughout the program. Global variable is also visible inside function , provided that it should not be re-declared with same name inside function because “High Priority is given to Local Variable than Global”. Global variable can be accessed from any function.
That’s all with variables in C Language for now. Let’s see soon with more interesting thing on C Programming .

Leave a Comment