# What is recursion explain with example?

Would you like to merge this question into it?

#### already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

#### exists and is an alternate of .

Recursion is when a function (procedure) calls itself.
Example:

int Fib (int n)
{
if ((n==1)(n==0))return 1;
else return Fib(n-1) + Fib(n-2);
}
33 people found this useful

# What is an example of using recursive functions?

Answer . \nLet's take the example of finding the factorial of a number (of a positive integer). \n. \nThe factorial of N is \nN * (N-1) * (N-2) * (N-3) ... * 3 * 2 *1\n.

# What is recursion?

Read answer of question: "What is recursion?" . Recursion in computer science is a way of 'Thinking About'and then 'Solving' problems. How does it look in reality when prog

# Can anybody explain stack level functioning of recursion in c language exclusively?

Yes, any body can explain stack level functioning of recursion in Clanguage exclusively. ;-) Whenever we invoke a function, the return address is pushed ontothe call stack. Th

# Examples using recursive procedure in the C computer programming language?

int factorial (int n) { if (n == 1) return 1; else return factorial (n - 1) * n; }

# What is recursive?

In computer programming, a function can call another function. If a function calls itself, it is said to be recursive. Doing this correctly can it quite simple to solve certai

# Write a example of recursion?

Following function calculates factorial of a number using recursion.. unsigned int factorial(unsigned int a) { if (a == 1) return 1; else { a *= factorial(a-1);

yes

# Explain the term Recursion with example?

recursive definition of a function is defined in which the function is defined in terms of itself.here the fuction calls itself repetitively.

# What is recursiveness?

Assuming you mean "recursion", recursion is a function calling itself. A good example of when you would use recursion is for a directory walker. You would call the function, p

# Write and explain recursive backtracking algorithm for n-queens?

This is not a question, this is your homework. For a start, read this: https://en.wikipedia.org/wiki/Eight_queens_puzzle

# Find an example or a recursive procedure and represent it as an iterative procedure?

int recursiveNFactorial (int n) { if (n < 2) return 1; if (n == 2) return n; else return n * recursiveNFactorial (n - 1); } int iterativeNFactorial (int n) { int re

# What is an example of recursive pattern in expository writing?

DEFINITION OF RECURSION IN WRITING: . When the speaker discusses a topic, then restates it using different words or symbolism. It is used to drive home a point and to give

# Explain non-recursive and recursive algorithm for postorder traversal on binary tree?

Step 1:- select first root node (t), start travelsing left contin
In Uncategorized

# What is the purpose of a stack in implementing a recursive procedure Explain?

there is no a prior limit on the depth of nested recursive calls (that a recursive function may call itself any no. of times), we may need to save an arbitrary number of reg