What will be the output of the following pseudocode for `a = 1, b = 1, c = 7`?
Integer a, b, c
Set a = 1, b = 1, c = 7
a = a + b
if(a + b)
if(b + (c ^ a))
a = 2
b = a
End if
End if
Print a + b + c
Pseudocode Test - 1
Quiz
•
Computers
•
Professional Development
•
Hard
CodElevate Technologies
Used 3+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following pseudocode for `a = 1, b = 1, c = 7`?
Integer a, b, c
Set a = 1, b = 1, c = 7
a = a + b
if(a + b)
if(b + (c ^ a))
a = 2
b = a
End if
End if
Print a + b + c
8
9
10
11
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following pseudocode for `a = 5, b = 3`?
Integer calculate(Integer a, Integer b)
Integer result
result = a << 1
result = result | b
return result
End function calculate()
13
11
15
10
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following pseudocode for `a = 3, b = 4, c = 5`?
Integer a, b, c
Set a = 3, b = 4, c = 5
a = a * b
if(a - b)
if(b - (c ^ a))
a = 2
b = a
End if
End if
Print a + b + c
12
15
9
25
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following pseudocode for `a = 2, b = 3`?
Integer calculate(Integer a, Integer b)
Integer result
result = a >> 1
result = result ^ b
return result
End function calculate()
1
3
5
2
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the result of the following pseudocode for `a = 5, b = 8`?
Integer performOperation(Integer a, Integer b)
Integer result
result = (a & b) | (a ^ b)
return result
End function performOperation()
13
8
5
0
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Int a,b,c
Set a=1 b=7 c=13
c=(b+1)^a
a=(5&2)&c
a=(b+7)+b
Print a+b+c
33
35
37
39
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
How many time hello printed
Set k=1, p=4
int j=p+k/2
if (j equals p)
print "hello"
end if
j=p+k/5
if(j not equals p)
print "hello"
end if
print "hello"
2
3
4
1
13 questions
História do Java
Quiz
•
Professional Development
10 questions
Exercise No 1-Intro to Java
Quiz
•
Professional Development
15 questions
PROGRAMACION.1.Conceptos Básicos
Quiz
•
Professional Development
10 questions
Android y sus generalidades
Quiz
•
University - Professi...
10 questions
Sw Development
Quiz
•
Professional Development
17 questions
Success Forge C# Assignment 1
Quiz
•
Professional Development
12 questions
StreamQuiz
Quiz
•
Professional Development
12 questions
JDK,JRE,JIT & JVM MCQs
Quiz
•
Professional Development
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade