FC0-U71 Software Development Concepts Practice Question
A junior developer writes a program that stores a customer's age in a variable. The program must later perform arithmetic, such as adding five years to that age. Which data type is MOST appropriate for this variable?
⚠ Common exam trap
The trap here is assuming any type that can display the age, such as a string, is acceptable, when the requirement is specifically to perform arithmetic on it.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Integer
The variable must hold a whole-number age and support arithmetic such as adding five years. An integer satisfies both requirements directly, providing numeric storage and calculation. A Boolean cannot represent numbers, a string treats the value as text and concatenates instead of adding, and an array is meant for collections rather than a single scalar value.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Boolean
Why it's wrong here
A Boolean holds only true or false values, which cannot represent a numeric age or support arithmetic such as adding five years. Using a Boolean here would make the addition operation invalid, and the compiler or interpreter would reject it. The scenario explicitly requires numeric calculation, so a two-state logical type does not fit the requirement at all.
- ✗
Array
Why it's wrong here
An array holds an ordered collection of multiple values, which is unnecessary for storing a single age. While an array could technically contain one number, it adds complexity and does not directly support the simple addition described. A single scalar numeric type is the correct fit for one age value.
- ✓
Integer
Why this is correct
An integer stores whole numbers and supports arithmetic operations, so it can hold an age and allow adding five years. Ages are naturally whole values, making an integer a precise and efficient choice without unnecessary decimal precision. This matches the stated requirement to perform arithmetic on the stored value.
- ✗
String
Why it's wrong here
A string represents a sequence of characters such as text. Although "25" can be stored as a string, adding five to it would typically concatenate characters rather than perform numeric addition, producing an unintended result like "255". The scenario needs genuine arithmetic, so a text type is inappropriate.
Go deeper
Related to this question
About these practice questions
This FC0-U71 question is part of Courseiva's 988-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This FC0-U71 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U71 exam.