Wednesday, 18 February 2015

Procedural Programming (Variables)



      How to start coding in C               Lesson 1


First of all you have to know C variable  

 

What is variable?  

A variable is nothing but a name given to a storage area that your programs can manipulate. Each variable in C has a specific type.


The name of a variable can be composed of letters, digits, and the underscore character.


Local Variables


Variable which might be declared in the functionality are usually known as nearby factors. Local variables can be used only by statements that are inside the block in which the variables are declared. Local variables exist only while the block of code in which they are declared is executing. Although its statement happen after the main ( ) function.

 

Global Variables


Unlike local variables, global variables are known throughout the program & may be used by any piece of code. Also, they will hold their value throughout the program's execution. Make a global variable by announcing them outer of any function. Although its declaration occurs before the main () function.




Any question about variable writes down in comment box. Everyday check this blog u will learn lot things of C programming and Web application development 

 



No comments:

Post a Comment