Question 31
MediumWhat will be the output of the following pseudocode?
Integer a = 3, b = 4, c = 5
Print (a < b) AND (b > c)
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Pseudocode and Output Prediction
What will be the output of the following pseudocode?
Integer a = 3, b = 4, c = 5
Print (a < b) AND (b > c)
1
0
3
4
Sign up free to see the answer and a step-by-step explanation.
What will be the output of the following pseudocode?
Integer a = 3, b = 4, c = 5
Print (a * a + b * b == c * c)
1
0
50
25
Sign up free to see the answer and a step-by-step explanation.
What will be the output of the following pseudocode?
Integer x = 20
x = x / 3 * 3 // integer division
Print x
18
20
21
6
Sign up free to see the answer and a step-by-step explanation.
What will be the output of the following pseudocode?
Integer x = 20
x = x * 3 / 3 // integer division
Print x
21
18
60
20
Sign up free to see the answer and a step-by-step explanation.
What does the following pseudocode print?
Integer a = 10, b = 4
Print a / b, a mod b, a - b * 2 + 1
2 2 13
2 2 1
2.5 2 13
2 2 3
Sign up free to see the answer and a step-by-step explanation.
What does the following pseudocode print?
Integer x = 2 + 3 * 4 - 6 / 2
Print x
11
8
7
17
Sign up free to see the answer and a step-by-step explanation.
What will be the output of the following pseudocode?
Integer x = 17
x = x mod 5 * 3 + x / 5
Print x
12
9
3
6
Sign up free to see the answer and a step-by-step explanation.
What does the following pseudocode print?
Integer a = 5, b = 0
Boolean r = (a > 3) or (a / b > 1)
Print r
5
Division by zero error
true
false
Sign up free to see the answer and a step-by-step explanation.
What is the output of this pseudocode?
Integer i = 5, j
j = i++ * 2
Print i, j
5 12
6 12
5 10
6 10
Sign up free to see the answer and a step-by-step explanation.
What is the output of this pseudocode?
Integer i = 5, j
j = ++i * 2
Print i, j
5 12
6 10
6 12
5 10
Sign up free to see the answer and a step-by-step explanation.