English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2006-12-07 20:25:45 · 6 answers · asked by Ganesh 1 in Computers & Internet Programming & Design

6 answers

.
Recrusion is the process where a function present in a program calls itself again and again, with the its body loop.

You could see the below link for more details.
http://www-128.ibm.com/developerworks/linux/library/l-recurs.html?ca=dgr-lnxw06Recursion

**********
Vasu M
**********

2006-12-10 17:14:05 · answer #1 · answered by V@su Maniram 3 · 1 0

Recursion in computer programming defines a function in terms of itself. One example application of recursion is in recursive descent parsers for programming languages. The great advantage of recursion is that an infinite set of possible sentences, designs, or other data can be defined, parsed, or produced by a finite computer program.

One common example is the function used to calculate the factorial of an integer:
this is a pascal program

function Factorial(x: integer): integer;
begin
if x <= 1 then
Factorial := 1
else
Factorial := x * Factorial(x-1);
end

In this program u can c the function Factorial which accepts an integer parameter.In the program if the passed values is 1 or less than 1 it exists.else it keeps on calling the same function until it becomes 1.

2006-12-08 05:07:43 · answer #2 · answered by Sreejith Kumar P 2 · 0 0

Recursion is a tool not often used by imperative language developers, because it is thought to be slow and to waste space, but as the author demonstrates, there are several techniques that can be used to minimize or eliminate these problems. He introduces the concept of recursion and tackle recursive programming patterns, examining how they can be used to write provably correct programs. Examples are in Scheme and C.

For new computer science students, the concept of recursive programming is often difficult. Recursive thinking is difficult because it almost seems like circular reasoning. It's also not an intuitive process; when we give instructions to other people, we rarely direct them recursively.

For those of you who are new to computer programming, here's a simple definition of recursion: Recursion occurs when a function calls itself directly or indirectly.

It's very easy to become too involved in prematurely optimizing Java code in terms of code size or speed.

2006-12-08 05:55:13 · answer #3 · answered by Roja 5 · 0 0

recursive means repeating itself.
there is many situatoin where we need to do the same thing changing some variable but the funcitonality of the work is same. Like you see urself in between two mirror facing one to one and tilt by slight angle. You will find many pictures of yours, just like that type of work we need a function which depict the same procedure. An in computer language recursive programming come

2006-12-08 04:37:11 · answer #4 · answered by anubhav2k 2 · 0 0

When the function/procedure calls itself then it is said to be recursive function

for eg

int factorial(int a)
{
if(a>1)
return a*factorial(a-1);
return a;
}

In the above example factorial is again called

2006-12-08 04:29:25 · answer #5 · answered by csplrj 2 · 0 0

My Lord Ganesh try this link and find out

http://en.wikipedia.org/wiki/Recursion_(computer_science)

2006-12-08 04:30:45 · answer #6 · answered by Joe_Young 6 · 0 0

fedest.com, questions and answers