11. Variables in C Programming


Variables :
In programming, a variable is a container (storage area) to hold data.
To indicate the storage area, each variable should be given a unique name (identifier).
Variable names are just the symbolic representation of a memory location.
For example:
                         int playerScore = 95 ;
Here, playerScore is a variable of integer type.
Here, the variable is assigned an integer value 95.

Rules for naming a variable :
1. A variable name can have letters (both uppercase and lowercase letters), digits and
underscore only.
2. The first letter of a variable should be either a letter or an underscore.
3. There is no rule on how long a variable name (identifier) can be. However, you may run into problems in some compilers if variable name is longer than 31 characters.

Comments

Popular posts from this blog

12. Library Functions of C Programming

13. Control Strings in C Programming

4. What is Compiler ?

7. Introduction of C programming :

18. Identifiers and Keyword in C programming

10. Data Types of C Programming

3. What is programming language ?

8. Program structure rules of C programming

9. Header Files of C Programming