Variables in C Programming

Identifiers are of two types: variables and functions. The rule for creating names and using them remains the same. But the functionalities are different. Variables are named memory locations or identifiers used to store particular type of data / value throughout the code. These variables are declared at the beginning of code to indicate its datatype. These can accept the values from the user, and get changed during the different steps of code.

int intVar1, intSum;
float flAvg;

Here intVar1, intSum, flAvg are the variables. They store only their declared type of data. For example intVar1 stores only integer values, it cannot store any float or character values.

Translate »