exam questions

Exam FC0-U61 All Questions

View all questions & answers for the FC0-U61 exam

Exam FC0-U61 topic 1 question 279 discussion

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

Which of the following should a developer use to ensure a block of code executes a defined number of times?

  • A. for loop
  • B. while loop
  • C. if ... else statement
  • D. switch statement
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
1 week, 4 days ago
Selected Answer: A
A for loop is specifically designed to execute a block of code a defined number of times. It typically consists of an initialization, a condition to continue looping, and an increment/decrement statement. This makes it ideal when you know beforehand how many iterations you need. Here’s why the other options are not the best fit:
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