What will be the output of the following pseudocode?
Integer i
Set i = 3
do
print i + 3
i = i - 1
while(i not equals 0)
end while
Pseudo code Practice 1
Quiz
•
Computers
•
1st - 3rd Grade
•
Medium
prem sagar
Used 31+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following pseudocode?
Integer i
Set i = 3
do
print i + 3
i = i - 1
while(i not equals 0)
end while
5 5 5
Infinite loop
6 6 5
6 5 4
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What would be the output of the following pseudocode?
Integer a
String str1
Set str1 = “goose”
a = stringLength(str1)
Print (a ^ 1)
Note: ^ is XOR operator
5
3
4
0
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Consider an array A = {1, 2, 4, 5, 6, 11, 12} and a key which is equal to 10. How many comparisons would be done to find the key element in the array using the binary search?
5
3
1
2
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What would be the output of the following pseudocode?
Integer i, j, k
Set k = 8
for(each i from 1 to 1)
for(each j from the value of i to 1)
print k+1
end for
end for
8
7
9
2
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following pseudocode?
Integer a, b
Set a = 15, b = 7
a = a mod (a - 3)
b = b mod (b – 3)
a = a mod 1
b = b mod 1
Print a + b
0
2
7
15
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following pseudocode?
Integer a, b, c
Set b = 5, a = 2, c = 2
if(b>a && a>c && c>b)
b = a + 1
Else
a = b + 1
End if
Print a + b + c
5
26
13
2
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
For which of the following applications can you use hashing?
1. To construct a message authentication code.
2. For Timestamping
3. For detecting a cycle in a graph
Choose the correct answer from the options given below.
Only 1 and 3
Only 2 and 3
Only 1
Only 1 and 2
10 questions
Yr 7 Flowgorithm
Quiz
•
3rd Grade
10 questions
JENIS-JENIS MEDAN
Quiz
•
1st - 6th Grade
15 questions
Programming quiz for all
Quiz
•
1st - 3rd Grade
10 questions
Основы языка Паскаль
Quiz
•
1st - 5th Grade
10 questions
Be4Pspsm21920
Quiz
•
1st - 5th Grade
10 questions
Programming - Syntax & Logic Errors
Quiz
•
3rd - 12th Grade
10 questions
Flowchart
Quiz
•
1st - 9th Grade
14 questions
Lists, Subroutines and Sequence in Pseudocode - Python
Quiz
•
1st - 11th Grade
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
10 questions
American Flag
Quiz
•
1st - 2nd Grade
14 questions
IREAD-3 Practice Test
Quiz
•
3rd Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Perimeter of Polygons!
Quiz
•
3rd Grade
10 questions
2nd Grade math review
Quiz
•
2nd Grade
20 questions
Math Review
Quiz
•
3rd Grade
18 questions
Traits
Quiz
•
3rd Grade
16 questions
Chapter 8 - Getting Along with your Supervisor
Quiz
•
3rd Grade - Professio...