Thursday, 26 June 2014

What are Variables

Variables are the arrangements in a programing language that are used to store data which is manipulated during the execution of the program.
Variable can store character or integer (whole numbers with their negative images) or a real number(called as floating point value).
For different types of variables write these statements:
char var;                            /*for character variable*/
int var;                               /*for integer variable*/
float var;                            /*for floating variable*/

  • A character variable can store only single character in it like : 'a' , '$' , '3' , '\n' etc.
  • An integer variable can store a number between -32768 to 32767.
  • A float variable can store -3.4E+38 to +3.4E+38
Naming Rules of Variables: Click Here

there are other types of variables also but we will see them later as we encounter their use.

<<Back        Next>>

No comments:

Post a Comment