exam questions

Exam FC0-U61 All Questions

View all questions & answers for the FC0-U61 exam

Exam FC0-U61 topic 1 question 193 discussion

Actual exam question from CompTIA's FC0-U61
Question #: 193
Topic #: 1
[All FC0-U61 Questions]

Which of the following programming constructs would be used to repeat a statement 100 times in a loop?

  • A. IF
  • B. ELSE
  • C. RETURN
  • D. WHILE
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
lexxone
2 months ago
Selected Answer: D
D. WHILE Explanation: A WHILE loop is used to execute a block of code repeatedly as long as a specified condition is true. If you need to repeat a statement 100 times, a loop like WHILE, FOR, or DO-WHILE is the appropriate choice. Why the other options are incorrect: A. IF – Used for conditional statements but does not create a loop. B. ELSE – Works with IF to handle alternative execution paths but does not repeat code. C. RETURN – Used to exit a function and does not facilitate looping.
upvoted 1 times
...
Torrente
2 months, 2 weeks ago
Selected Answer: D
WHILE loop is used when you need to repeat a block of code based on a condition.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago