exam questions

Exam FC0-U61 All Questions

View all questions & answers for the FC0-U61 exam

Exam FC0-U61 topic 1 question 191 discussion

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

A programmer is creating a program that makes a decision based on user input and has decided to use a branching statement. Which of the following commands would be BEST for the programmer to use?

  • A. IF THEN
  • B. WHILE
  • C. FOR
  • D. BEGIN
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
An IF THEN statement is used for decision-making in programming. It allows the program to execute certain blocks of code based on whether a specified condition is true or false, making it ideal for branching based on user input. Here’s why the other options are not suitable: B. WHILE: A WHILE loop is used for repeating a block of code while a condition is true, not for decision-making. C. FOR: A FOR loop is used for iterating a block of code a specific number of times, not for conditional branching. D. BEGIN: The BEGIN command is used to start a block of code, but it does not make decisions based on conditions.
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