- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Identifier and Variable
In this post, we will understand the difference between an identifier and a variable.
Identifier
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.
Example
enum geeks_artiles_in {Jan=1, Feb, Mar, Apr, May, June, July}
Variable
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.
Example
int a = 6;
- Related Articles
- Difference Between Keyword and Identifier
- Difference Between Local and Global Variable
- Difference between Variable and Fixed Rate Student Loans
- Difference between Linear Variable and Rotary Variable Differential Transformers (LVDT vs RVDT)
- Difference between static, auto, global and local variable in C++
- What is the difference between a variable and StringVar() of Tkinter?
- What is the difference between Declaring and Initializing a variable in JavaScript?
- Organizationally Unique Identifier
- JavaScript this Identifier
- Difference between declaring a variable before or in a Java loop.
- __func__ identifier in C
- Difference Between & and &&
- What are the differences between a pointer variable and a reference variable in C++?
- In C++ What are the differences between a pointer variable and a reference variable?
- Order MySQL results without identifier?

Advertisements