25-04-2012, 04:45 PM
CONSTANTS and VARIABLES
C Kamthane.pdf (Size: 535.75 KB / Downloads: 166)
INTRODUCTION
A programming language is designed to help certain kinds of data process consisting
of numbers, characters and strings to provide useful output known as information. The task of
processing of data is accomplished by executing a sequence of precise instructions called
program.
Tri-graph Characters
Many non-English keyboards do not support all the characters. ANSI C introduces the
concept of “Trigraph” sequences to provide a way to enter certain characters that are not
available on some keyboards.
KEYWORDS AND IDENTIFIERS
Every C word is classified as either a keyword or an identifier.
All keywords have fixed meanings and these meanings cannot be changed.
Eg: auto, break, char, void etc.,
Identifiers refer to the names of variables, functions and arrays. They are user-defined
names and consist of a sequence of letters and digits, with a letter as a first character. Both
uppercase and lowercase letters are permitted. The underscore character is also permitted in
identifiers.
Rules for defining variables
v They must begin with a letter. Some systems permit underscore as the first character.
v ANSI standard recognizes a length of 31 characters. However, the length should not
be normally more than eight characters.
v Uppercase and lowercase are significant.
v The variable name should not be a keyword.
v White space is not allowed.