Skip to main content

What are variables ? Give the conditions for variables.


keywords:
Keywords have fixed meanings and these meanings can not be changed. There are 32 keywords.Some compiler may use additional keywords that must be identified from the C manual. Keywords serve basic building block for a program statement. Such as, auto,break,double etc. All keyword must be written in lowercase.

Variables:
A variable is a data name that may be used to store data value. A variable may take different value at different times during execution. Some examples are, average,height, class_strength.

Conditions for variables:
Variable names may consist of letters, digits and the underscore character, subject to the following conditions.

(i) Must consist of only letters, digits and underscores.

(ii) First character must be an alphabet. Some system permits underscore as the first character.

(iii) 31 characters are permitted. But only the first 8 characters are signiticant.

(iv) Uppercase and lowercase are significant.

(v) It should not be a keyword.

(vi) White spaces are not allowed.

(vii) Keyword may be a part of the variable. such as int_type.



-------------------------------------
Posted By -