answersLogoWhite

0

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.

User Avatar

Wiki User

10y ago

What else can I help you with?

Continue Learning about Basic Math

Difference between normal function inline function?

gffg


What is the difference between a function and Procedure?

Girraf


What is the difference between friend function and normal member function?

We can access a Friend function from any other class in which friend function is introduced or declared even if the other class is not a member of first class. But when we use normal member function, we can have its access only in the derived classes of the first class. This is the basic difference between a friend function and a normal member function.


What is base case in recursion?

The base case in recursion is a condition that stops the recursive calls, preventing the function from calling itself indefinitely. It serves as the simplest instance of the problem, where the solution is known and can be returned directly without further recursion. Establishing a clear base case is essential for ensuring that recursive algorithms terminate correctly and efficiently. Without it, a recursive function may lead to stack overflow errors or infinite loops.


What is the difference between echo and print and printf in PHP?

The print function is slightly more dynamic than the echo function by returning a value, and the echo function is slightly (very slightly) faster. The printf function inserts dynamic variables/whatever into wherever you want with special delimiters, such as %s, or %d. For example, printf('There is a difference between %s and %s', 'good', 'evil') would return 'There is a difference between good and evil'.

Related Questions

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 a geometric sequence and a recursive formula?

what is the recursive formula for this geometric sequence?


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


Is macro a recursive function?

If you're asking if the c preprocessor supports recursive macros, the answer is no. The preprocessor is single-pass and since the "function" must be defined before it can be referenced, it can not be recursive.


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 is a recursive relationship?

a function that recalls itself again and again is called recursive relationship.


Can you use main function as a recursive function in C?

Yes


What is the definition of non recursive in c?

non recursive function is excuted faster than recrussive


What is the maximum depth of recursive calls a function may make?

Recursive function call depend your primary memory space because the recursive call store in stack and stack based on memory.


The efficiency of using recursive function rather than using ordinary function?

For some algorithms recursive functions are faster, and there are some problems that can only be solved through recursive means as iterative approaches are computationally infeasible.


Example of fundamental difference between a polynomial function and an exponential function?

fundamental difference between a polynomial function and an exponential function?