There are four major types of function definition
When a function has no arguments, it does not receive any data from the calling function. Similarly when it does not return a value, the calling function does not receive any data from the called function.
Syntax :
- Takes nothing Returns something
- Takes something Returns something
- Takes nothing Returns nothing
- Takes something Returns something
- Takes nothing Returns nothing
Syntax :
Function declaration : void function();
Function call : function();
Function definition :
void function()
{
statements;
}
Output:
The total amount is 5000.000000
No comments:
Post a Comment