A subprogram or function is a name given to a set of instructions that can be
called by another program or a subprogram.
This simplifies the programming process as functions
can be called again and again as desired.
Understand that a function is a complete program in
itself, similar to the C main( ) function, except that the name main( ) is replaced by the name of
the function that is given by the programmer.
Syntax
name (arguments)
{
……..
……..
……
}
‘type’
is the value returned by the function. If no value is returned back from the function, then the
keyword
Do'stlaringiz bilan baham: |