Define C Variables
Variables are use to store values temporary entered by a user. Variables are the entity that may vary during program execution. Variable names are called identifiers.
Rules to declare a variable:
1. The variable name can contains of any sequence of alphabets, numbers and underscore.
2. Variable name should not exceed 30 characters.
3. Variable name can be Alpha-numeric e.g. no1.
4. Special characters, blank space or any comma are not allowed.
5. The first character should be alphabet or an underscore.
6. Variable name cannot start with a number.
7. Upper and lower case letters are distinguishable.
8. A Keyword cannot be used to declare a variable name.
Example: Valid Variable names:
int _a; // can start with underscore character. float r1; // can contain number. double circle_area; // can contain underscore character.
Example: In-Valid Variable names:
int $a; //connot start with special symbols like $. float 1r; //invalid, cannot start with a number. double circle area; //invalid, connot contain space.
Note: In C, all variables must be declared before use with its data type.