+ 2

What is deffrence between identifier and variable

in program not a theory and how declare variable and identifier in our program

27th Feb 2022, 4:14 PM
Saurav
Saurav - avatar
2 Answers
+ 4
A variable is a name that points to a memory location. It is the basic unit of storage in a program. The value of a variable can be changed during program execution. All the operations are done on the variable effects that memory location Identifiers are used for the naming of variables, functions, and arrays. It is a string of alphanumeric characters that begins with an alphabet, or an underscore( _ ) that are used for variables, functions, arrays, structures, unions, and so on. It is also known as the user-defined word.
2nd Mar 2022, 1:41 PM
😇🌟SWATI🌟😇
😇🌟SWATI🌟😇 - avatar
+ 1
Identifier is the name that identifies a resource. A variable is a construct that can hold variable values. A constant also have an identifier. But it's not a variable. The same goes for methods and enums.
27th Feb 2022, 8:49 PM
Mustafa A
Mustafa A - avatar