Tuesday 1 October 2013

Variables in C

Introduction                                                                                                                Constant 



Variables:- To specify the memory locations we use the variables. variables are those by which we represent the data. so each variable should have the unique name called identifier.

Rules for writing the variables.

1)Variables name can contains alphabets,digit , _(underscore) only.
2)The first letter of variable must be letter or _(underscore).
3)You will take only 31 characters long variable name.
4)no space between the variable name.
5)does not contain any special symbol except _
6)we can not declare variable name same as the keywords.
7)Name of variables are case sensitive.

Ex:- _vaibhav , abc ,  ab_c_d ,

wrong :- 1ab , abc d , abc# , ab*c , if , switch ,

EX:- int a = 10;

int data type
a variable name
10 value stored in a



No comments :

Post a Comment