Please enable Javascript to correctly display the contents on Dot Net Tricks!

Variable in C language

  Author : Shailendra Chauhan
Posted On : 26 Oct 2012
Total Views : 3,190   
Updated On : 30 Jan 2014
 

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 compilers 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 :

     deepak, Deepak and DEEPAK

    are different.

What do you think?

In this article I try to explain the concept of variable it's usage and it's types in C language. I hope you will be beneficial by this article. Comment and critics are welcome.



Free Interview Books
 
COMMENTS (0)
23 MAY
Xamarin Forms : Build Cross-platform Apps (Online)

09:00 PM-11:00 PM IST(+5.30 GMT)

Know More
5 MAY
ASP.NET MVC with Angular4 Development (Online)

06:30 AM-08:30 AM IST(+5.30 GMT)

Know More
29 APR
Xamarin Forms : Build Cross-platform Apps (Classroom)

5:00 PM-6:30 PM

Know More
29 APR
ASP.NET MVC with Angular2 Development (Classroom)

9:30 AM-11:00 AM

Know More
27 APR
ASP.NET Core Development (Online)

07:00 AM - 09:00 AM IST( TUS, THR)

Know More
22 APR
NodeJS Development (Classroom)

11:00 AM-12:30 PM

10 APR
Master Class ASP.NET MVC 5 with Angular2 Plus Angular4 Development (Online)

09:00 PM - 11:00 PM IST (M/W/F)

8 APR
MEAN Stack 2 Development (Classroom)

11:00 AM-12:30 PM

25 MAR
Xamarin Forms : Build Cross-platform Apps (Classroom)

8:00 AM-9:30AM

21 MAR
ASP.NET MVC with Angular2 Development (Online)

09:00 PM - 11:00 PM IST( TUS, THR, SAT)

25 FEB
ASP.NET MVC with Angular2 Development (Classroom)

03:30 PM-05:30 PM

24 FEB
Angular 2 with Type Script (Online)

09:00 PM-11:00 PM IST(Mon,Wed,Fri)

BROWSE BY CATEGORY
 
 
LIKE US ON FACEBOOK
 
+