Pseudo-code · Question 18 · Easy
What will be the output of the following pseudocode?
Integer marks
Set marks = 72
if (marks >= 90)
Print "Outstanding"
else if (marks >= 75)
Print "Distinction"
else if (marks >= 60)
Print "First Class"
else
Print "Pass"
end if
- Pass
- Distinction
- First Class
- First Class Pass
Answer and explanation
Answer: C. First Class
Explanation: 72 fails the >= 90 and >= 75 tests but passes >= 60, so First Class is printed and the remaining branches are skipped.
Previous: What will be the output of the following pseudocode? (Note: for-loop bounds… · Next: What will be the output of the following pseudocode?
Practise pseudo-code
Try a fresh set of pseudo-code questions with an explanation after every answer, free and without signing up: Pseudo-code practice. Or sit a full placement mock test.
More pseudo-code questions
- What will be the output of the following pseudocode? (Note: array indices…
- What will be the output of the following pseudocode? (Note: / denotes integer…
- What will be the output of the following pseudocode? (Note: for-loop bounds…
- What will be the output of the following pseudocode?
- What will be the output of the following pseudocode? (Note: / denotes integer…
- What will be the output of the following pseudocode? (Note: for-loop bounds…
- What will be the output of the following pseudocode?
- What will be the output of the following pseudocode? (Note: array indices…
- What will be the output of the following pseudocode?
- What will be the output of the following pseudocode? (Note: &, ^ and >> are…
More technical & programming practice
C Programming · Java · Python · Data Structures · Algorithms · Object-Oriented Programming · DBMS · SQL
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge