Function prototype
Function defining
return_type function_name(parameter_type parameters)
{
predefined logic
return_value
}
Function Calling
function_name(arguments)
What is a function ?
Function is a set/block of instructions/predefined logic which takes arguments/parameters as input and process the input using the predefined logic and gives the desired output/return value.
What are arguments?
Arguments also know as parameters are the inputs to a function.
In specific
Arguments are the Actual values ,We use this in function calling.
Parameters are the Placeholders ,We use this in function definition.
What are return values?
Return values are the output of a function.
What are the types of functions ?
Basically Functions are divided into 4 types:
1)No arguments No return values.
2)No arguments with return values.
3)With arguments No return values
4)With arguments With return values
No comments:
Post a Comment