nerdexam
ExamsFC0-U61Questions#31
CompTIA

FC0-U61 · Question #31

FC0-U61 Question #31: Real Exam Question with Answer & Explanation

The correct answer is D: Pancakes. The output of the Breakfast program if it ran on Sunday would be pancakes. The program uses an if- else-if-else statement to choose among different breakfast options based on the day of the week input. The program first checks if the day input is equal to "Saturday". If this cond

Question

Given the following pseudocode: If the Breakfast program ran on Sunday, which of the following would be the output?

Exhibit

FC0-U61 question #31 exhibit

Options

  • AOatmeal
  • BBacon and eggs
  • CWaffles
  • DPancakes

Explanation

The output of the Breakfast program if it ran on Sunday would be pancakes. The program uses an if- else-if-else statement to choose among different breakfast options based on the day of the week input. The program first checks if the day input is equal to "Saturday". If this condition is true, it prints "Waffles" and ends. If this condition is false, it checks if the day input is equal to "Sunday". If this condition is true, it prints "Pancakes" and ends. If this condition is false, it prints "Oatmeal" and ends. Since the day input is "Sunday", the second condition is true, and the program prints "Pancakes".

Community Discussion

No community discussion yet for this question.

Full FC0-U61 Practice
Given the following pseudocode: If the Breakfast program ran on... | FC0-U61 Q#31 Answer | NerdExam