Write short notes on:

  1. Tail recursion
  2. Collision resolution techniques


This answer is not selected as best answer. This answer may not be sufficient for exam.

Your limit has been exceed. We have implemented this system because, We got difficulty on managing our servers. Please donate some amount to remove this limit.

Quota: 0 / 30


Tail Recursion:

A function that returns the value of its recursive call is said to be tail recursion. Simply a  function is said to be tail recursive if there are no any calculations occur in the recursive stage and it only returns the value.



Fact(n, accumulator){
    if(n == 0)
        return accumulator;
        return Fact(n-1, n * accumulator);

    return Fact(n, 1);

void main(){
    int num, f;
    printf("Enter any number");
    scanf("%d", &num);
    f = Factorial(num);
    printf("Factorial of given number is %d", f);

The output of above program is

Enter any number


Factorial of given number  = 3628800

If you found any type of error on the answer then please mention on the comment or submit your new answer.
Leave your Answer:

Click here to submit your answer.

  Loading . . .