
ZimZam
Authored by Vamsi Abhi
Information Technology (IT)
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the value of s, if n=127?
Read n
i=0,s=0
Function Sample(int n)
while(n>0)
r=n%10
p=8^i
s=s+p*r
i++
n=n/10
End While
Return s;
End Function
27
127
187
87
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output if limit = 3?
Read limit
n1 = 0, n2= 1, n3=1, count = 1;
while count <= limit
count=count+1
print n3
n3 = n1 + n2
n1 = n2
n2 = n3
End While
113
112
111
123
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the value of s if N=3?
Read N
Function sample(N)
s = 0
f = 1
i = 1
while i <= N:
f = f * i
s = s +(i / f)
i+=1
End while
return(s);
End Function
1
2
3
4
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Read a=56 ,b=876
Function mul(a, b)
t = 0
while (b != 0)
t = t + a
b=b-1
End While
return t;
End Function
49095
49055
49056
49099
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Read number = 2630
Function divisible(number)
even_counter = 0
num_remainder = number
while (num_remainder)
digit = num_remainder % 10
if digit != 0 AND number % digit == 0
even_counter = even_counter + 1
end if
num_remainder = num_remainder / 10
end while
return even_counter
End Function
1
11
2
22
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following pseudocode for input a = 30, b = 60, C = 90?
Integer a, b, c, sum
Read a, b, c
Set sum = a + b + c
if ((sum EQUALS 180) and (a NOT EQUALS 0) and (b NOT EQUALS 0) and (c NOT EQUALS 0))
Print " Success"
Otherwise
Print "Fail"
End if
Fail
Success
Error
None
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following pseudocode for a = 9, b = 7?
Integer funn(Integer a, Integer b)
Integer c
Set c = 2
b = b mod c
a = a mod c
return a + b
End function funn()
4
2
3
1
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?