Wednesday, 19 February 2014

What is a constant,variable and keyword in C?

To learn C Language at first we need clear idea on What is a constant,variable and keyword in C?

Constant refers to the fixed value that do not change during the execution of program. A constant may be number , character or character string that can be used as a value in a program. To use constant to reprent integer,floating point or charcter value that can not be modified.
       Constant divided into two major categories

Primary constant—integer,real,character

Secondary constant-array,pointer,structure,union,enum.

A constant is an entity that does not change whereas variable is an entity that change during execution of program.

       In any program we typically do lots of calculations. The results of these calculations are stored in computers memory. Like human memory the computer memory also consists of millions of cells. The calculated values are stored in these memory cells. To make the retrieval and usage of these values easy these memory cells (also called memory locations) are given names. Since the value stored in each location may change the names given to these locations are called variable names.

X is variable that store the value in his memory location.3 is constant

Variable can change the value now .

In c language some special words or character are defined by default that is called keyword.each keyword have own special mean in program.Keywords are special word that can not be used as variable name.

Here some flowing words are keywords


Answered by Sunil 
student, OCC (Online coaching Class)


  1. This comment has been removed by a blog administrator.

  2. Interesting Article. Hoping that you will continue posting an article having a piece of useful information. .science class 12