What is Identifier? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is Identifier?

int num = 5; is 5 a Identifier or not ?

12th Sep 2021, 1:15 PM
Rishi
Rishi - avatar
3 Answers
+ 9
"identifier" is the name by which you identify something. in int num = 5; "num" is the identifier which is currently being used to identify a literal '5'.
12th Sep 2021, 1:18 PM
Arsenic
Arsenic - avatar
+ 2
Arsenic it's like variable, right?
12th Sep 2021, 11:02 PM
Amirreza
Amirreza - avatar
+ 2
Amirreza Hashemi "identifier" is a much wider term and is simply a name that is used to identify something, that name can be of a variable, constant, function, class, struct etc. For example int func () { // do something } int main () { func (); } Here "func" is an identifier which is identifying a function and not a variable.
13th Sep 2021, 12:58 AM
Arsenic
Arsenic - avatar