CompTIA ITF+ (FC0-U61) — Question 55
Joe, a developer, is writing a program in which he needs to store a number that changes over the duration of the program's run. Which of the following would Joe
MOST likely use to accomplish this?
Answer options
- A. Loop
- B. Variable
- C. Constant
- D. Function
Correct answer: B
Explanation
The most suitable choice for storing a number that can change during the program's execution is a Variable. A Loop is used for repetitive actions, a Constant holds a fixed value, and a Function encapsulates code for reuse but does not specifically store changing data.