What are Keywords & Identifiers?

Every C word is classified as either a keyword (or) identifier.

Keyword :

There are certain reserved words called keywords. All key words have fixed meanings & these meanings can not be changed.

Keywords serve as basic building blocks for program st. there are 32 keywords in ANSI ‘C’. all keywords must be written in lower case letters. They are not used as var& fun names.

Ex. Break, static, int,switch…..

Identifiers:

The identifier is a name given to the program ele_ such as names of vars functions & arrays.

These are user-defined names & consist of a sequence of letters & digits, with a letter as a first character.

Both upper case & lower case letters are permitted, although lower case letters are commonly used.

The underscore characters is also permitted in identifies. It is usually used as a line between 2 words in long identifies.

 Rules for identifiers:

1.1st character must be an alphabet (or underscore).

2. must consist of only letters, digits or.

3. only first 31 characters are significant.

4. cannot use a keyword.

5. must not contain white space.

Related

C Language 4612695548262803356

Post a Comment

emo-but-icon

item