Friday 26 November 2010

VARIABLES & KEYWORDS | Fundamentals of Programming (FOP)

VARIABLES

A variable is a named data storage location in your computer’s memory. By using a variable’s name in your program, you are, in effect, referring to the data stored there.


VARIABLE NAMING CONVENTION

To use variables in your C programs, you must know how to create variable names in C,variables names must add according to the following rules:

• The name can contain letters, digits, and the underscore character(_).

• The first character of the name must be a letter. The underscore is also a legal first character, but its use is not recommended.

• Case matters (that is uppercase and lowercase letters). Thus, the names count and Count refer to two different variables.

• C keywords can’t be used as variable names. A keyword is a word that is part of the C language.


KEYWORDS

There are words with specific meaning to ‘C’ language system. They are known as keywords of ‘C’ language. Keyword must not be used as variable names. There are 32 keywords in ‘C’ language. Which are as under :

Auto, Double, Int, Struct, break,Elose, long, Swith, case, enum,Ragister, typeof, char, external, return,Union, const, float, short, unsigned,Continue, for, signed, void, default,Goto, sizeof, volatile, do, if, Static, while

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Grants For Single Moms