Font size
WorksheetsWeekly Contest #10 - TechXNinjas
Total questions: 10
Worksheet time: 5mins
Recursion is similar to which of the following?
Switch Case
Loop
If-else
If elif else
What does the following function do?
x + y
x + x*y
x*y
xy
The solution of the recurrence relation T(m) = T(3m / 4) + 1 is :
θ (lg m)
θ (m)
θ (mlg m)
θ (lglg m)
What does f(173) print?
010110101
010101101
10110101
10101101
What is the output of the following code for the input arr[]={1,2,3,4,5,6} N=6?
0
21
7
Error
Total numbers of stars printed by this code is:
n(n+1)
n(n+1)/2
2n(n-1)
n(n-1)/2
What is the output of the following code?
10
1
1 to 10
10 to 1
Write the output of the following code?
(a)
What does the following function do?
It returns 1 when n is a multiple of 3, otherwise returns 0
It returns 1 when n is a power of 3, otherwise returns 0
It returns 0 when n is a multiple of 3, otherwise returns 1
It returns 0 when n is a power of 3, otherwise returns 1
Which one of the following is TRUE?
The function returns 0 for all values of j.
The function prints the string something for all values of j.
The function will exhaust the runtime stack or run into an infinite loop when j = 50
The function returns 0 when j = 50.
