Difference Between Identifier and Variable

In this post, we will understand the difference between an identifier and a variable.


  • All of them are not variables.

  • They are used to name a variable, a function, a class, a structure, a union.

  • It is created to give a unique name to an entity.

  • They can consist of alphabets, digits, and underscores.

  • There is no punctuation or special symbol, except the underscore.

  • It can be upper case or lower case.

  • It can start with lower case letter, upper case letter or an underscore.

  • It helps locate the name of the entity which is defined along with a keyword.


enum geeks_artiles_in {Jan=1, Feb, Mar, Apr, May, June, July}


  • It is used to give a name to a memory location.

  • It holds a value.

  • The names of variables are different.

  • They help allot a unique name to a specific memory location.


int a = 6;