C programming variable

                                 C programming variable

In this chapter you will learn about C programming variables and the naming conventions of variables.
C variable
The variable in the programming is a data-store (notainer) or storage area.

To specify the storage area, each variable has to give a unique name (identifier). Variable is a symbolic name to indicate memory location. For example:

int age = 30;


Here age is the variable of an integer type and its value is assigned 32.

Variable values ​​can be changed due to variables in the variable name.

Before deploying C programming, it is necessary to declare the variable.


Rules for placing variable names in C programming
A valid variable name can contain only alphabets (uppercase or lowercase), digits and underscores (_).
The name of the variable should start with letters or underscores. However, starting the name of the variable with underscores was discouraged. Because the name of the variable starting with underscores can cause some errors in the name of the system.
The name of the variable can be of any length. However, the compiler chose the first 31 letters as the name of the variable. Therefore, the first 31 letters of the two variables are to be separated in a program.
C is a strict type of language. That is, the type of variable does not change when editing the program.

Visit our variable data type section to learn more about data type.

Post a Comment

0 Comments