nerdexam
CompTIA

FC0-U61 · Question #478

A program will request user input and perform an operation several times if the input is correct. Which of the following techniques BEST describes the fact that the operation is only performed if…

The correct answer is A. Looping. The scenario describes an operation that is performed repeatedly only if a condition (correct input) is met, which is the defining characteristic of a looping construct in programming.

Software Development

Question

A program will request user input and perform an operation several times if the input is correct. Which of the following techniques BEST describes the fact that the operation is only performed if the input is correct?

Options

  • ALooping
  • BBranching
  • CReuse
  • DModeling

How the community answered

(38 responses)
  • A
    95% (36)
  • B
    3% (1)
  • D
    3% (1)

Why each option

The scenario describes an operation that is performed repeatedly only if a condition (correct input) is met, which is the defining characteristic of a looping construct in programming.

ALoopingCorrect

Looping allows a block of code to execute multiple times as long as a specified condition (e.g., correct input) remains true, precisely matching the description of an operation performed several times if the input is correct.

BBranching

Branching executes one path or another based on a condition but does not inherently involve repeating an operation multiple times.

CReuse
DModeling

Concept tested: Programming control flow - Looping

Source: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/while

Topics

#Programming logic#Conditional statements#Branching#Control flow

Community Discussion

No community discussion yet for this question.

Full FC0-U61 Practice