x

C++ Variables

PREV     NEXT

What are variables?

The variables are basically used to store the values which can be modified later on in the program. The variables can be declared in many ways and every way with different memory requirements. The variable is used to represent a name of memory location that is allocated by the compiler depending upon the data type of the variable. The variable defined within a program has a specific type which determines the size and the layout of the variable memory. At the time of declaration the variables are composed of letters, digits and an underscore character. It can start with either a letter or an underscore. In C++, the uppercase and lowercase letters are unique because C++ is case sensitive.


For example :