BASIC ELEMENTS IN C:
The C language
is composed of the following basic types of elements:
constants,
identifiers, operators, punctuation, and keywords
These elements
are collectively known as tokens. A token is a source program text that
the compiler does not break down into component elements.
Consider the
statement:
number = number
+ 1;
The tokens are,
number
|
-
|
identifier
(variable)
|
=
|
-
|
operator
|
+
|
-
|
operator
|
1
|
-
|
constant
|
;
|
-
|
punctuation
|
The above
statement has a collection of tokens such as identifier, constant, operator
etc. The words like if, while, for etc., are termed as keywords in C
programming language and their usage is restricted to specific purposes.
No comments:
Post a Comment