What is difference between variable and identifier | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

What is difference between variable and identifier

7th Oct 2016, 4:33 PM
Utsav Solanki
Utsav Solanki - avatar
6 Answers
+ 14
the identifier is part of a variable. A variable is made of identifier and value (and address...) int i=5 i=5 is the variable i is the identifier 5 is the value
7th Oct 2016, 4:50 PM
marcram
+ 3
nice explanation
8th Oct 2016, 3:59 AM
Balaji Rs
Balaji Rs - avatar
+ 2
A variable retains space in your ram to store data in it. While programming you're going to access 1 or more times that space. C++ provides you 2 possibilities to refer or to access that space: 1) By using a name (identifier) you chose 2) By using its address (looking like this 0x47e000) The programmer must chose what he likes the most :p
10th Oct 2016, 9:29 AM
victor03303
- 1
identifier is the smallest unit in program that have that have some meaning
8th Oct 2016, 4:36 AM
tanukhelnah
- 1
identifier is smallest unit were as variable is which can vary throughout the program
12th Oct 2016, 5:17 PM
Shailesh Yadav
Shailesh Yadav - avatar
- 4
Variable is another name
9th Oct 2016, 12:08 AM
Durgesh
Durgesh - avatar