In C, a variable is declared by specifying a type name followed by the variable. For example,
int j;
declares j to be a variable of type int.
You can declare several variables of the same type in one statement as in:
int a, b, c; // declares 3 variables of type int
The variables are separated by commas, with a semicolon after the last one.
You can declare a variable and give it an initial value in one statement, as in:
int j = 14;
This declares j to be int and gives it a value of 14.
In the next article, we will show how to print an integer using a “field width”.