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
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
Comments
Post a Comment
Give your valuable Comment...