Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

Difference between Keyword and Identifier

  • Difficulty Level : Basic
  • Last Updated : 27 Jan, 2020

Keywords:
Keywords are specific reserved words in C each of which has a specific feature associated with it. Almost all of the words which help us use the functionality of the C language are included in the list of keywords. So you can imagine that the list of keywords is not going to be a small one!
There are a total of 32 keywords in C:

   auto       break    case     char     const     continue
   default    do       double   else     enum      extern
   float      for      goto     if       int       long
   register   return   short    signed   sizeof    static
   struct     switch   typedef  union    unsigned  void
   volatile   while 

Identifiers:
Identifiers are used as the general terminology for naming of variables, functions and arrays. These are user defined names consisting of arbitrarily long sequence of letters and digits with either a letter or the underscore(_) as a first character. Identifier names must differ in spelling and case from any keywords. You cannot use keywords as identifiers; they are reserved for special use. Once declared, you can use the identifier in later program statements to refer to the associated value. A special kind of identifier, called a statement label, can be used in goto statements.

Attention reader! All those who say programming isn't for kids, just haven't met the right mentors yet. Join the  Demo Class for First Step to Coding Coursespecifically designed for students of class 8 to 12. 

The students will get to learn more about the world of programming in these free classes which will definitely help them in making a wise career choice in the future.

Difference between Keyword and Identifier:

SR. NO.KEYWORDIDENTIFIER
1Keywords are predefined word that gets reserved for working progs that have special meaning and cannot get used anywhere else.Identifiers are the values used to define different programming items such as variables, integers, structures, unions and others and mostly have an alphabetic character.
2Specify the type/kind of entity.Identify the name of a particular entity.
3It always starts with a lowercase letter.First character can be a uppercase, lowercase letter or underscore.
4A keyword should be in lower case.An identifier can be in upper case or lower case.
5A keyword contains only alphabetical characters.An identifier can consist of alphabetical characters, digits and underscores.
6They help to identify a specific property that exists within a computer language.They help to locate the name of the entity that gets defined along with a keyword.
7No special symbol, punctuation is used.No punctuation or special symbol except ‘underscore’ is used.
8Examples of keywords are: int, char, if, while, do, class etc.Examples of identifiers are: Test, count1, high_speed, etc.

My Personal Notes arrow_drop_up
Recommended Articles
Page :