0
What is Identifier?
int num = 5; is 5 a Identifier or not ?
3 Réponses
+ 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'.
+ 2
Arsenic it's like variable, right?
+ 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.