A variable can store any data type in C programming. The name of the variable has nothing to do with its type. The general syntax of declaring a variable primarily is
Here, var1, var2,…varn are the names of valid variables.
Variables can also be defined in multiple lines instead of on the same line.
data_type var1; data_type var2; data_type varn;
When the variables are declared in single line, then the variables must be separated by commas.
Note: All declaration statements must end with a semi-colon(;).
int age; float weight; char gender;
In these examples, age, weight and gender are variables which are declared as integer data type, floating data type and character data type respectively.