Skip to main content

Variables in C language

C Language Beginner level

Variable :

A Variable is the way to store the value while the life time of the code execution . As the name Variable indicates , definitely we can change the value of Variable when we need in the entire life cycle of a program .

We can also say a variable like a small box having a value inside it and can be changed later and can be assigned a new value .

Syntax to define a Variable in C : 

int x , y , z ;
char x , y , z ;
float x , y z ;
double x ,y , z ; 

Note :

  • Here we used the three variables in each statement x , y , z but we can choose more or less variables as the requirement while writing the code .
  • Here we just defined the Variables .
  • Here 1st statement shows that , we declared three variables x , y ,z of Integer Data Type  .
  • Here 2nd statement shows that , we declared three variables x , y ,z of Character Data Type .
  • Here 3rd statement shows that , we declared three variables x , y ,z of Float Data Type .
  • Here 4th  statement shows that , we declared three variables x , y ,z of Double Data Type .
  • Thus we can say , that we can declare the variables of multiple types where Integer Data Type stores Integer value , Float Data Type stores float value and So On . 
Let's see the various Data Types in C Language and their Meanings in Next Page . 



             << Previous Page    Next Page >>

Comments