easyMultiple ChoiceObjective-mapped
FC0-U71 Practice Question: A programmer needs to store a customer's name in…
A programmer needs to store a customer's name in a variable. Which data type is most appropriate?
⚠ Common exam trap
The trap here is that candidates might confuse a customer's name with a numeric identifier (like an ID) and incorrectly choose Integer, but names are inherently textual and require a string data type.
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
✓
String
A customer's name is a sequence of characters (letters, spaces, possibly punctuation), which is best represented as a String data type. In most programming languages, strings are used to store text and are enclosed in quotes (e.g., "John Doe"). This aligns with the fundamental concept that names are not numeric or logical values.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
String
Why this is correct
String stores text such as names.
- ✗
Float
Why it's wrong here
Float stores decimal numbers.
- ✗
Integer
Why it's wrong here
Integer stores whole numbers, not text.
- ✗
Boolean
Why it's wrong here
Boolean stores true/false values.
Go deeper
Related to this question
About these practice questions
One of 988 original FC0-U71 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.