# 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); }
+ 19 others found this useful
In Physics

# Explain the process of refraction and an example?

Refraction is the phenomena that occurs when a ray of light changes direction when it passes through a medium with a different refractive index. This is observable as by subme… Continue reading

# Can Explain with an example to the default constructor?

The following example shows a Lamborghini class with two constructors: class Lamborghini { Lamborghini() { } Lamborghini(String name) { } } Will the compiler put in a def… Continue reading

# 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;}

Thanks for the feedback!

# 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); ret… Continue reading

# Explain events in VB with an example?

Make a form. Go to its events tab. Double click on the text that says: "FormClosing". You should be taken to the code to Form1_FormClosing(). Under here, write MsgBox("Window … Continue reading