Difference Between Keywords and Identifiers

By BYJU'S Exam Prep

Updated on: September 25th, 2023

According to the C paradigm, major differences exist between keywords and identifiers. A keyword in C has a predefined meaning, while an identifier is just a name assigned by the user or programmer to a memory, function, or constant value.

Difference Between Keywords and Identifiers PDF

In C programming, keywords and identifiers play an important role as they are the basic building blocks of the language. We will explore the differences between keywords and identifiers in this article, along with individually discussing keywords and identifiers in brief.

Download Complete Computer Networks Formula Notes PDF

Difference Between Keywords and Identifiers

The main difference between keywords and identifiers is that a keyword can contain only the alphabet, whereas an identifier can contain alphabets, digits, and underscores. The differences between the two are essential parts of the GATE CSE syllabus.

Key Differences Between Keywords and Identifiers



It should always be in lowercase.

It can be in lower case or upper case.

It has a predefined meaning. They are reserved for use by the user.

It has no meaning attached to it. Usually, an identifier is a name provided by the user.

No special symbol is used.

Except for the underscore, no other special symbol is used.

It specifies the type of entity.

It gives a name to the type of entity.

Example: void, int, signed, etc.

Example: test, _abc, etc.

What is a Keyword in C?

Keywords are predefined reserved words present to the user in the C language. Any C program must have keywords present in it. In fact, a program in C begins with the keyword itself. The keyword is a type of C token which is used for formulating various problems in the GATE question paper.

In C, there are 32 reserved words or keywords present. Keywords are used in functions, blocks, loops, user-defined data structures, etc. The keywords are as follows: auto, default, float, register, struct, volatile, break, do, for, return, switch, while, char, else, if, signed, union, case, double, goto, short, typedef, const, enum, int, sizeof, unsigned, continue, extern, long, static, void.

What is an Identifier in C?

An identifier is a name given to memory space or a function for future reference in the program. An identifier does not have predefined meanings. They are user-defined names composed of letters and digits.

For an identifier to be valid, we need to follow the predefined rules to declare an identifier that is an identifier should only begin with a letter or an underscore and not by any digit. Identifiers are essential for the GATE exam. It cannot contain any special symbol other than letters, digits, or underscore.

Check out the following topics related to the difference between keywords and identifiers:

Related GATE Notes
Difference Between MAC Address and IP Address Difference Between POP and OOP
Difference Between mealy machine and moore machine Difference between derived and fundamental data types
Difference between network and internet Difference between exothermic and endothermic reactions
Difference Between overloading and overriding Difference between HTTP and HTTPS
Our Apps Playstore
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303
Home Practice Test Series Premium