Variable in c


a variable is a name given to memory location where the data can be stored . Variable name may be change but constant is fixed .
Variable in C Programming is also called as container to store the data. Variable name may have different data types to identify the type of value stored. Suppose we declare variable of type integer then it can store only integer values.Variable is considered as one of the building block of C Programming which is also called as identifier.


Let a , b ,c are varaiable hear we initilize
now value of a is assign into b i.e
b=a again
if we print a
output will be 5 hear there time variable are change but constant are fixed i.e 5

Rules to name a Variable

Defining of a Variable

Defining a variable means the compiler has to now assign a storage to the variable because it will be used in the program.
 Syntex :-data type variable name;
Example :-
int a ;

Initialization of a Variable

Syntax :- 
Data types Variable Name = data ;
int a=5;


Constant is a value which will not change during the execution of a programe . It is also con not be modified in the program while running or compile

Constants can be classified as