Variables in C

What is Variables?

Variable in C Programming is also called as container to store the data. Variable name may have different data types to identify the type of value stored. Suppose we declare variable of type integer then it can store only integer values.Variable is considered as one of the building block of C Programming which is also called as identifier.

Simple Example of Variables


main()
{
       Int a=10;
       printf(“The Value of a is %d”,a);
}
							

Rules for naming C variable

1.Variable name must begin with letter or underscore.

2.Variables are case sensitive

3.They can be constructed with digits, letters.

4.No special symbols are allowed other than underscore.

5.sum, height, _value are some examples for variable name

There are three types of variables

1.Local variable

2.Global variable

3.Environment variable

Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit

You may also like this!