+ 5
What is difference between variable and identifier
6 Antworten
+ 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
+ 3
nice explanation
+ 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
- 1
identifier is the smallest unit in program that have that have some meaning
- 1
identifier is smallest unit were as variable is which can vary throughout the program
- 4
Variable is another name