Question:1
Question:2
Question:3
Question:4
Question:5
Question:7
Question:8
Question:9
Consider the following recursive function fun(x, y). What is the value of fun(4, 3)
Question:10
What does the following function print for n = 25?
Question:11
Question:12
What does fun2() do in general?
a)x*y b)x + x*y c)x^y d)y^x
Question:13
What does the following function do?
a)x+y b)x + x*y c)x*y d)x^y
Question:14
What does the following function do?
a) It returns 1 when n is a multiple of 3, otherwise returns 0
b) It returns 1 when n is a power of 3, otherwise returns 0
c) It returns 0 when n is a multiple of 3, otherwise returns 1
d) It returns 0 when n is a power of 3, otherwise returns 1
Question:15
Question:16
Question:17
What is the return value of the function foo when it is called foo(345, 10)?
a)345 b)12 c)5 d)3
Question:18
What is the return value of the function foo when it is called as foo(513, 2)?
a)9 b)8 c)5 d)2
Question:19
The value returned by f(1) is
a)5 b)6 c)7 d)8
Question:20
The return value of fun(5) is __________.
a)0 b)26 c)51 d)71
Question:21