FC0-U71 Software Development Concepts Practice Question
A developer needs to store several related values for one record, such as a product's name, price, and quantity, and pass them around as a single unit. The values have different data types. Which data structure is MOST appropriate?
⚠ Common exam trap
The trap here is choosing a string because it can technically hold everything, ignoring that it discards data types and requires reparsing.
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
The product record combines a text name, a numeric price, and a numeric quantity that belong together. A record or struct with named fields stores these related, differently typed values as one unit and keeps each field's type intact. A delimited string loses typing, a Boolean is too limited, and an integer array cannot hold the text name or provide meaningful field names.
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 integers
Why it's wrong here
An array of integers can hold multiple numbers but cannot store the product name, which is text. Mixing a string into an integer array is not allowed in strongly typed languages. This structure also lacks named fields, making it unclear which position holds which value.
- ✓
A record or struct with named fields
Why this is correct
A record or struct groups related values under one name, with each field having its own type. This lets the product name, price, and quantity travel together as a single unit while preserving type safety. It directly matches the need to treat several differently typed, related values as one logical entity.
- ✗
A single string containing all values separated by commas
Why it's wrong here
Packing values into a delimited string loses type information and forces every consumer to parse and validate the text. Arithmetic on the price or quantity would require conversion back to numbers, introducing errors. While simple, this approach does not preserve the distinct data types the scenario requires.
- ✗
A Boolean flag
Why it's wrong here
A Boolean stores only a true or false state and cannot hold a name, price, and quantity together. It is far too limited for representing a multi-field record. The scenario needs several values of different types, so a two-state logical type cannot satisfy the requirement.
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.