Wednesday, April 21, 2010

Function prototype&Why need function prototype in mutual recursion.

Function prototype: A function prototype is a statement of a function that omits the function body but does specify the function's name, argument types and return type. While a function definition specifies what a function does, a function prototype can be thought of as identifies its bellow. Function prototypes are usually written at the beginning of a program, ahead of any programmer-defined functions.
Why need function prototype in mutual recursion n: When two or more functions call one another it is called mutual recursion. Like under function:


                                    Int a( )
{ b( ) }
Int b(
{ a( ) }
Here (a) and (b) two function & process mutual recursion. Beginning at the program we need write a function prototype. Case here (b) can called (a) but (a) can’t call (b). In the beginning the program declared (a) integer type. So (b) can call (a), but (b) does not declare. So (a) can’t call

0 comments em “Function prototype&Why need function prototype in mutual recursion.”

Post a Comment

Give your valuable Comment...

 

Programming, Data Structures & Algorithms Copyright © 2011 -- Template created by JAK -- Powered by Blogger