644 views

2 Answers

Best answer
2 votes
2 votes

Head Recursion: When the first statement of the function is the recursive call. (X)

Tail Recursion: When the last statement of the function is the recursive call and nothing has to be done when function call returns. (Y)

Nested Recursion: A recursive function where the argument passed to the function is the function itself. (Z)

Indirect Recursion: Indirect recursion occurs when a method invokes another method, eventually resulting in the original method being invoked again. (W)

edited by
1 votes
1 votes

OPTION C is correct . 

TAIL RECURSION :- in the recursive program if there is only one recursive call that to in the end , that programs are called Tail recursive program. It is similar to a loop

HEAD RECURSION:- If the recursive call occurs at the beginning of a function ,it is called a head recursion . The function saves the states before jumping into the next recursive call.

Related questions

0 votes
0 votes
2 answers
2
Akash Mishra asked Jul 7, 2017
574 views
What is the value of F(n, m)?Function F(n, m : integer) : integer; begin if(n <= 0) or (m <= 0) then F:=1 else F := F(n-1, m) + F(n, m-1); end;
5 votes
5 votes
2 answers
3
shekhar chauhan asked Jun 28, 2016
1,538 views
Can Someone explain either Tree or Stack method to trace out this recursion ?What is the output of this Program ?
2 votes
2 votes
0 answers
4