Exam-style question
Try this first
Which of the following best describes the purpose of a variable in an algorithm?.
- A.To store a fixed value that cannot change.
- B.To define the steps for solving a problem.
- C.To temporarily store and manipulate data during program execution.
- D.To group different data types under a single name.
Answer and explanation
Concise answer
To temporarily store and manipulate data during program execution.
Why this is correct
A variable's primary function is to hold values that can change as an algorithm executes. Options A describes a constant, Option B describes an algorithm, and Option D describes a record.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
