Wednesday 1 August 2012

IDENTIFIER AND VARIABLES

                                  Identifiers
              
                                              

  1. Identifiers is everything which is a user defined. for example variable name,function name ,templates ,class etc
  2. Identifier is everything which is used ti identify any language is known as identifier as the name suggestion.
  3. identifier have some rule that how they must define like begin with a character or $ sign.             
There are following name valid identifier in c#:=>

1.       WORLD

2.       world
3.       w_orld
4.       HelloWorld
5.       Z
6.       Z
7.       \u098world
8.       @public
9.       _world


                      Variables




Variables an entity that may vary during program execution is called variable.Variable names are names given to location in memory.These locations can contain integer,real or character constant.
The value of a variable can be changed through assignment or through use of the ++ and - operators.

Declaration:=>
              
             In  C# all variables are  declared before they are used. In the declaration of variables is specify a data type and a name for the variable so that memory can be set aside for the variable.

Syntax of Variable:=>

                           scope=initial value;


The scope determines the accessibility of the variable (public, local,
private) and the default is private. 

The data type specifies what kind of data the variable will hold.
Optionally the variable can be initialize to a specific value. 

All variables must be initialize (given a value) before they are used in
any calculation. 

If the variables are not initialize  the compilation of the program will fail.

Now you can download the copy of this article in pdf format by just click on below download link..


I hope this post will help you.

Thanks !!

If still you have some query regarding to  this article then please post your comment after that i will 100% reply back  you…:)                                                                        















0 comments:

Post a Comment

Hey thanax alot to comment i will revert you back soon...

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites