FC0-U71 Software Development Concepts Practice Question
A development team is using a stack data structure to manage function calls. Which of the following correctly describes the order in which items are removed from a stack?
⚠ Common exam trap
FC0-U71 often tests the LIFO vs. FIFO distinction, so candidates confuse stack (LIFO) with queue (FIFO) when the question mentions ordering, especially under time pressure.
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
✓
Last-In-First-Out (LIFO)
A stack is a Last-In-First-Out (LIFO) data structure: the most recently pushed element is the first one popped. This matches how function call stacks work — the most recent function call returns first. The scenario explicitly references managing function calls, which is the canonical LIFO use case.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Last-In-First-Out (LIFO)
Why this is correct
A stack removes the most recently pushed item first, so function calls unwind in reverse order of invocation. This LIFO behaviour satisfies the stem's requirement: the latest call must return before its caller resumes, which is exactly how nested function execution and recursion are managed.
- ✗
Random order
Why it's wrong here
Stack removal is deterministic: the top element, last pushed, is always removed first. Random removal describes no standard abstract data type; hash tables approximate arbitrary access by key, but a stack's LIFO discipline fixes the order exactly.
- ✗
First-In-First-Out (FIFO)
Why it's wrong here
FIFO describes a queue, where the earliest enqueued item leaves first. A stack is LIFO, so the most recently pushed call frame returns first, which is why recursion unwinds in reverse call order. Queues suit breadth-first traversal and print spooling.
- ✗
Based on priority
Why it's wrong here
A stack removes the most recently added item, so priority plays no role in its ordering. Priority queues, such as heaps, order removal by assigned priority, which is the correct structure when tasks must be processed by urgency rather than recency.
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.