Start C# here

Study C#.. Go ahead ! !

Tuesday, March 18, 2008

What is a Variable?

Variable is a name given to a memory location.
Variable will be having a memory address value

For eg:-
int iNum1
char cName
float fNum etc..

Here, int,char,float represents the Data type to be used and iNum1,cName,fNum are the variable names given for those DataTypes.



Rules For Declaring a Variables :-

  • A Variable name Should Start with an Alphabet
  • Key Words representing the program should not be used as variable name.
    • for eg: numeric, int, console etc.. should not be used.
  • Special characters except an underscore( _ ) are not allowed
  • Variable names should not start with a number.

No comments: