HOW TO DEFINE VARIABLES IN C++?
As you define the variable it let the compiler know that how much and where to create the storage for the variable. They are declared before they are taken in use but in C++ you can declare them in the middle of the program but before using them. The variable defined in the program specifies the data type and contains the list of one or more variables of the same data type.
LET US HAVE A LOOK AT THE SYNTAX:
In this syntax, type is a data type like int, char, float, double, etc. and variable-list is that which contains one or more identifiers names separated by commas. Like
int a, b, c;
float x, number;