FC0-U71 Software Development Concepts Practice Question
A developer is designing a program that stores a customer's mailing address, which consists of a street, city, state, and postal code. The developer wants to keep these related values grouped together and access them by name rather than by numeric position. Which data structure is the best fit?
⚠ Common exam trap
The trap here is treating an array as an equivalent substitute because it can hold the same values, overlooking that the scenario specifically requires access by name rather than by numeric position.
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
✓
A record or struct with named fields
Grouping related values and accessing them by name is the defining purpose of a record or struct. It keeps the address components together as one logical unit while letting code refer to each part through a descriptive field name. Arrays use positional indexes, a single string loses structure, and Booleans cannot hold text, so a record or struct is the appropriate structure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
An array of four strings
Why it's wrong here
An array stores elements in a fixed order and is accessed by numeric index, such as address[0] for the street. That works but forces the developer to remember which index maps to which field, which is exactly what the scenario wants to avoid. Arrays do not provide named fields, so they are a poorer fit than a structure with named members.
- ✗
A single string containing all four values
Why it's wrong here
Concatenating street, city, state, and postal code into one string loses the individual fields and their types. Extracting a component later would require parsing the string, which is fragile and error-prone when values contain spaces or commas. It does not provide named access to the parts, so it fails the design goal.
- ✗
A Boolean flag for each address component
Why it's wrong here
A Boolean holds only true or false and cannot store text such as a street or city name. Using flags would discard the actual address data entirely. Flags might indicate whether an address was verified, but they cannot represent the components themselves, so this choice does not meet the requirement.
- ✓
A record or struct with named fields
Why this is correct
A record or struct groups related values under one name and exposes each value through a named field, such as address.city or address.postalCode. This matches the requirement to keep the parts of an address together while accessing them by meaningful names instead of numeric positions, improving readability and reducing mistakes.
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.