1.  Both a() and b() aren’t tail recursive

2.  Both a() and b() are tail recursive

3.  b() is tail recursive but a() isn’t

4.  a() is tail recursive but b() isn’t

4
Correct Answer :

b() is tail recursive but a() isn’t


Explanation :
No Explanation available for this question

1.  Every recursive function must have a base case

2.  Infinite recursion can occur if the base case isn’t properly mentioned

3.  A recursive function makes the code easier to understand

4.  Every recursive function must have a return value

4
Correct Answer :

Every recursive function must have a return value


Explanation :
No Explanation available for this question

1.  50

2.  100

3.  74

4.  Infinite loop

4
Correct Answer :

100


Explanation :
No Explanation available for this question

1.  True

2.  False

2
Correct Answer :

False


Explanation :
No Explanation available for this question

1.  Program gets into an infinite loop

2.  Program runs once

3.  Program runs n number of times where n is the argument given to the function

4.  An exception is thrown

4
Correct Answer :

Program gets into an infinite loop


Explanation :
No Explanation available for this question

1.  Making the code look clean

2.  A complex task can be broken into sub-problems

3.  Recursive calls take up less memory

4.  Sequence generation is easier than a nested iteration

4
Correct Answer :

Recursive calls take up less memory


Explanation :
No Explanation available for this question

1.  It’s easier to code some real-world problems using recursion than non-recursive equivalent

2.  Recursive functions are easy to debug

3.  Recursive calls take up a lot of memory

4.  Programs using recursion take longer time than their non-recursive equivalent

4
Correct Answer :

Recursive functions are easy to debug


Explanation :
No Explanation available for this question

1.  0 1 2 3

2.  An exception is thrown

3.  0 1 1 2 3

4.  0 1 1 2

4
Correct Answer :

0 1 1 2


Explanation :
No Explanation available for this question

1.  Shallow copy

2.  Deep copy

3.  memberwise

4.  All of the mentioned

4
Correct Answer :

Shallow copy


Explanation :
No Explanation available for this question

1.  [88, 2, 3, [4, 5]][88, 2, 3, [4, 5]]

2.  [2, 3, [4, 5]][88, 3, [4, 5]]

3.  [88, 2, 3, [4, 5]][2, 3, [4, 5]]

4.  [2, 3, [4, 5]][2, 3, [4, 5]]

4
Correct Answer :

[2, 3, [4, 5]]
[88, 3, [4, 5]]


Explanation :
No Explanation available for this question

Interview Questions

MongoDB
Java Script
Node JS
PHP
JQuery
Python