answersLogoWhite

0

A reentrant function is called by the program during execution and can be interrupted and recalled later. A recursive function can call itself during execution and repeats itself without interruption.

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

Difference between function and recursive variable?

A function can map for sets with infinite elements. Recursive variables, being 'algorithms of algorithms', are restricted to finite elements.


What is the difference between recursive and non recursive program?

A recursive system is one in which the output is dependent on one or more of its past outputs while a non recursive system is one in which the output is independent of any past outputs.e.g feedforward system having no feedback is a non recursive system.


Differences between declaring a method and calling a method?

Declaring a method is when you code for what the method will perform. When you call a method, you are using the method you have written in another part of the program, (or inside the method if it is recursive).


How do you choose between recursion and iteration?

Some problems cry out for recursion. For example, an algorithm might be defined recursively (e.g. the Fibonacci function). When an algorithm is given with a recursive definition, the recursive implementation is straight-forward. However, it can be shown that all recursive implementations have an iterative functional equivalent, and vice versa. Systems requiring maximum processing speed, or requiring execution within very limited resources (for example, limited stack depth), are generally better implemented using iteration.


What is a recursive call. Which data structure is used in it?

Stack. Because of its LIFO (Last In First Out) property it remembers its 'caller' so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.

Related Questions

What is the difference between function and recursive function?

I will explain in the easiest way the difference between the function and recursive function in C language. Simple Answer is argument of the function is differ but in the recursive function it is same:) Explanation: Function int function(int,int)// function declaration main() { int n; ...... ...... n=function(a,b); } int function(int c,int d) { ...... ...... ...... } recursive Function: int recursive(int,int)// recursive Function declaration main() { int n; ..... ..... ..... ..... n=recursive(a,b); } int recursive(int a,int b) { ..... .... .... .... } Carefully see, In the recursive Function the function arguments are same.


Difference between function and recursive variable?

A function can map for sets with infinite elements. Recursive variables, being 'algorithms of algorithms', are restricted to finite elements.


What is the difference between recursive and non recursive program?

A recursive system is one in which the output is dependent on one or more of its past outputs while a non recursive system is one in which the output is independent of any past outputs.e.g feedforward system having no feedback is a non recursive system.


What is set difference between recursive and recursively enumerable but not recursive?

All recursive Languages are recursively enumerable. But not all the recursively enumerable languages are recursive. It is just like NP complete.


What is the recursive formula for the sequence 8101214?

The sequence 8101214 appears to follow a pattern based on the difference between consecutive terms. The differences between the terms are 2, 2, 2, which indicates a constant difference. Therefore, the recursive formula can be expressed as ( a_n = a_{n-1} + 2 ), with the initial term ( a_1 = 8 ).


What are the differences between tail recursion and recursion, and how do they impact the efficiency and performance of algorithms?

Tail recursion is a special type of recursion where the recursive call is the last operation in the function. This allows for optimization by reusing the same stack frame for each recursive call, leading to better efficiency and performance. In contrast, regular recursion may require storing multiple stack frames, which can lead to higher memory usage and potentially slower execution.


What is the difference between a geometric sequence and a recursive formula?

what is the recursive formula for this geometric sequence?


Differences between declaring a method and calling a method?

Declaring a method is when you code for what the method will perform. When you call a method, you are using the method you have written in another part of the program, (or inside the method if it is recursive).


The differences between an aircraft and a spacecraft?

Spacecraft lack wings & their engines don't require air to function.


What describes a recursive sequence A a sequence that has a common difference between terms B a sequence that has a common ratio between terms C a sequence relating a term to one?

A: Un+1 = Un + d is recursive with common difference d.B: Un+1 = Un * r is recursive with common ratio r.C: The definition seems incomplete.A: Un+1 = Un + d is recursive with common difference d.B: Un+1 = Un * r is recursive with common ratio r.C: The definition seems incomplete.A: Un+1 = Un + d is recursive with common difference d.B: Un+1 = Un * r is recursive with common ratio r.C: The definition seems incomplete.A: Un+1 = Un + d is recursive with common difference d.B: Un+1 = Un * r is recursive with common ratio r.C: The definition seems incomplete.


What are the differences between the adult and infant kidneys?

In terms of function, nothing. The adult kidney is just much larger.


How do you choose between recursion and iteration?

Some problems cry out for recursion. For example, an algorithm might be defined recursively (e.g. the Fibonacci function). When an algorithm is given with a recursive definition, the recursive implementation is straight-forward. However, it can be shown that all recursive implementations have an iterative functional equivalent, and vice versa. Systems requiring maximum processing speed, or requiring execution within very limited resources (for example, limited stack depth), are generally better implemented using iteration.

Trending Questions
What specifies a variable's name and data type? Are radiators correctly named? What is a relationship in following a-polymorphism b-inheritance c-overloading d-none of these options? What is ELC in electrical term? A process which uses certain skills to solve a problem is called what? How big is the Programmable logic controllers industry and how fast does it grow each year? What is load factor method? Why welding thick carbon steel material has tendency to crack and why? In which layer will liquid petroleum be found in the oil trap shown in figure 4-1? How do you do isolation and lock-off procedure or permit-to-work procedure that applies to the electronic repair activities and the electronic equipment and circuits being worked? What are features of java for web applications? Is there power plants that don't give off harmful gases? Do washing machines heat the water internally ours has 2 pipes leading into it the pipe is branched from the cold feed and one of the pipes is connected to the cold inlet and the other to the hot? How do you write a c program which accepts a positive integer and displays the number of digits? What civilization was the first greek civilization? What is meant by pedefined types? Documentation of Hostel management system? In C language lowercase letters are significant? What precautionary measures in using simple machines must be practiced in order to avoid accidents? What is the maximum number of extents a dataset can allocate on one volume in VSAM dataset?