Your browser does not support JavaScript! Please enable script of your browser.
D
O
tNet-Tricks
Handy Dot Net Tricks Implementation !!
" Coding , A Rhythmic Literary Job "
C - Tutorial, Article, Archive, Pdf, Handy Tricks, Code Snippets, Training, Reference Manual, Data Type, Loop, Function, Array, Pointer, String, Structure, Union, Memory Allocation, File Handling

Variable in C language

Posted By : Samina Khan, 26 Oct 2012
Updated On : 26 Oct 2012
Version Support : All

Variable

Variables or symbolic variables are the names of storage location of computer memory whose values may vary during execution of a program.

These memory location may contain integer, real or character constant.

There are always two values associated with a symbolic variable.

(i) It’s data value(read value) stored at some location in memory and is referred as variable’s rvalue.

(ii) It’s location value(address value) the address at which it’s data value is stored and is referred as variable’s lvalue.

Key points about variable

  1. In ANSI standard, C recognizes length of a variable up to 31 characters. However, length should not be more than 8 characters. Since, many compilars treat only first 8 character as significant.
    For example :

     average_score and average_speed 

    are treated as same variable.

    It can be written as :

     avg_score and avg_speed or score_average and speed_average

  2. Upper and lower case are significant (means case sensitive)
    For example :

     samina , Samina and SAMINA

    are different.

 
 
 
Tips & Tricks Subscription :