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.
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)- A95% (36)
- B3% (1)
- D3% (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.
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.
Branching executes one path or another based on a condition but does not inherently involve repeating an operation multiple times.
Concept tested: Programming control flow - Looping
Source: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/while
Topics
Community Discussion
No community discussion yet for this question.