C language: Types of Variables

Share:
                                                             

                                               Youtube channel



------------------------------------------Variables:--------------------------------------------
                  1. These are used to store the value at certain memory location and that                                memory location is identified by that variable.
                  2. Their values can be change as per programmers need.
---------------------------------------------------------------------------------------------------
Example: In following fig. the value 10 is stored in the memory which is denoted by variable 'x'. 





       
Types of variables:
1. Local variables.
2. Global variables.

 ------------------------------------------- Description ---------------------------------------

Local Variables: 1. Those variables which is declared within the block are local variables.
2. Their accessibility is within the block only.

Global Variables: Those variables which is declared globally and accessible to all blocks of program.

----------------------------------------------------------------------------------------------------

No comments