.
Tokens
A token is the smallest unit used in a C program. Token can define in C as the smallest individual elements in a program that is meaningful to the functioning of a compiler.
The following are the types of tokens: Keywords, Identifiers, Constant, Strings, Operators, etc.
Identifier
Identifier refer to the name of user define variable, array and function. A identifier should be essentially a sequence of latter and digits. It is a type of string of alphanumeric characters that always begins with either an alphabetic or underscore character. There are specific rules to define the identifiers, and we can not use the already defined keywords present in the C language as identifiers.
|
|
|
|
|
|
|
|
Internal identifier
Internal identifiers are the ones that are not used in any of the external link processes. Internal identifiers, also known as internal names, include the names of local variables. The internal identifier can be a local variable. It has at least 31 significant characters.
External identifier
External identifiers are the ones that are used in an external link process. These identifiers are also known as external names; include function names and global variable names that are shared between source files. The external identifier can be a name of function or a global variable. It has at least 63 significant characters.
Keywords
Keywords are predefined, reserved words used in programming that have special meaning to the compiler. Keywords are part of the syntax and part of the syntax and they cannot be used as an identifier. These are the reserved words having predefine meaning in c program. These are 32 keywords as following.
Auto |
double |
int |
struct |
break |
else |
long |
switch |
case |
enum |
register |
typedef |
char |
extern |
return |
union |
continue |
for |
signed |
void |
default |
goto |
sizeof |
volatile |
constant |
float |
short |
unsigned |
Comments
Post a Comment