On a test I was asked the question
Give a definition of a variable
I answered:
A named location in memory.
The teacher marked my answer as wrong and said I need to add that variables can change.
I don’t think the teacher is correct here, as “constants” are an example of a variable that cannot be changed, and the question only asked for a general definition of the term.
What is the real definition?