What would you like to do?

What is recursion explain with example?

already exists.

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 .

What is recursion explain with example?
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);
}
+ 25 others found this useful
Thanks for the feedback!
Follow

Middle of Nowhere has won plenty of awards and received praised from all around the industry. Did you know the film would be so well-received when you read the script?

View Full Interview

Using an example explain what is a URL?

  Answer   a URL is the destination of a webpage and is identifiable by the code you type in to view a webpage, for example www.google.com is the URL code for the Go

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 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 regis

What is encapsulation explain with an example?

  Encapsulation is also known as information hiding, it is to protect data from the client using the classes but still allowing the client to access the data, but not modi
What is recursiveness?

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

What is persistence in oops explain with example?

The phenomenon where the object outlives the program execution time & exists between execution of a program is known as persistance

Adjective example and explain the examples?

adjectives describe things (nouns). A large dog. The adjective is large it describes the dog (noun). A big black dog. The adjectives are big and black they describe the do
What is recursion in c explain with the help of an example?

What is recursion in c explain with the help of an example?

Recursion is the technique of a function calling itself, rather than iterating through the use of loops. The classic example of a recursive function is the computation of N Fa

Can you explain figures of speech with examples?

List of Figures Of Speech Personification Personification is all about adding a human trait to an inanimate object or an abstraction. For example: The picture in that magazin
What is lvalue explain with example?

What is lvalue explain with example?

left-value: an expression that can be target of assignement. eg: array[x+1]->field = 100; # okay 100 = 200; # NOT okay: not lvalue intvar = 100; # okay (char *)intva