FC0-U71 Software Development Concepts Practice Question
A developer needs to store a collection of student names and their corresponding grades. The data should be accessed quickly by student name. Which data structure is most appropriate?
⚠ Common exam trap
CompTIA ITF+ often tests the distinction between sequential data structures (arrays, queues, stacks) and associative data structures (dictionaries), trapping candidates who confuse 'ordered collection' with 'keyed access'.
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
✓
Dictionary
A dictionary (also known as a hash map or associative array) stores key-value pairs, allowing O(1) average-time lookups by key. Since the developer needs to access grades quickly by student name, the dictionary's hashing mechanism directly maps each name to its corresponding grade, making it the most appropriate choice.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Array
Why it's wrong here
Arrays use numeric indices, not keys.
- ✗
Queue
Why it's wrong here
Queue is FIFO, not for key-value pairs.
- ✗
Stack
Why it's wrong here
Stack is a LIFO structure, not for key-value pairs.
- ✓
Dictionary
Why this is correct
Dictionary stores key-value pairs for fast access by key.
Go deeper
Related to this question
About these practice questions
Courseiva writes every FC0-U71 question from scratch — 988 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on FC0-U71
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A developer is writing a program that stores a collection of unique student IDs. The program needs to quickly look up a student by ID and does not require the IDs to be stored in any particular order. Which data structure is most appropriate for this task?
medium- ✓ A.Dictionary
- B.Queue
- C.Array
- D.Stack
Why A: A dictionary (hash map) provides fast key-based lookups and automatically handles uniqueness.
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.