Question PSC-COND-0007
EasyWhat will be the output of the following pseudocode?
Integer t = 0
if (t)
Print "True"
else
Print "False"
end if
- A.
Error
- B.
0
- C.
Show answer and explanation
Answer: C
As in C, a condition of 0 counts as false.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Conditionals question
What will be the output of the following pseudocode?
Integer t = 0
if (t)
Print "True"
else
Print "False"
end if
Error
0
Answer: C
As in C, a condition of 0 counts as false.
False
True