A function isa programming technique were we try to group some statements in to a unit and gave it a name and this unit then he invoked from the other parts of the programme.
To use a function you must do the following:
1.Provide a function definition
2.Provide a function prototype
3.call the function
If you are using a library function the function has already been defined and compiled for you and to provide prototype you can use a standard header file so all that's left to do is call the functions property.Functions canbe grouped in to the categories that don't have return values and functions properly.Functions without return values are terned void functions and they are declared in the following manner.
void functionname(Argument List)
{
statements;
A function with a return value of syntax
Typename functionname(Arguments)
{
statements;
return value;
}
Friday, August 7, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment