Courseiva
Applications and Software →mediumMultiple Choice

FC0-U71 Applications and Software Practice Question

A programmer is writing code that needs to repeat a block of instructions 10 times. Which programming construct is best suited for this task?

⚠ Common exam trap

The trap is selecting 'function' because functions also involve reusable code — but reuse is not the same as repetition, and the question specifically asks about repeating instructions a fixed number of times.

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

✓

Loop

A loop is the programming construct designed to repeat a block of instructions multiple times, either a fixed number of iterations (e.g., a for loop running 10 times) or until a condition is met (e.g., a while loop). It directly matches the requirement to repeat code 10 times. This is a fundamental control-flow concept in all programming languages.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Function

    Why it's wrong here

    A function groups reusable instructions but executes only when called; it provides no inherent iteration, so the block runs once per invocation. It is tempting because functions reduce duplication, but repeating ten times requires a loop calling or containing that code.

  • ✗

    Variable

    Why it's wrong here

    A variable stores a value; it cannot iterate or repeat instructions, so the loop never occurs. It is tempting because counters inside loops are variables, but the construct that performs the ten repetitions is the loop itself, not the storage container.

  • ✓

    Loop

    Why this is correct

    A loop is the construct designed for iteration, repeating a block of instructions a defined number of times. Setting the loop counter to 10 executes the block exactly ten times, directly satisfying the stated repetition requirement.

  • ✗

    Conditional (if/else)

    Why it's wrong here

    A conditional selects between branches based on a Boolean test; it executes at most once per evaluation and provides no repetition mechanism. It is tempting because loops contain conditions, but a condition alone cannot iterate ten times without a loop construct.

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 →

How Courseiva writes practice questions · Editorial policy

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.