+ 3
Function
Can someone explain me difference between function prototype and function definition
5 odpowiedzi
+ 12
A function definition cannot be called unless the function is declared. Thefunction prototype and the function definition must agree EXACTLY on the return type, the name, and the parameters. The only difference between the function prototype and the function header is a semicolon
+ 2
Thats is diffrence between function prototype and a function implementation
+ 1
Hmmm can u also help me with the position and uses of a function prototype and function header
+ 1
fun(); is function deceleration which tells compiler that we have made a function fun() and
fun()
{
} is function defination which tells the compiler about the operations that are to be performed by the function.In order for your program to work it should should satisfy following conditions:
1)return type should be same
2)no. and type of arguments should be same
You can simply copy function name along with parameters and return type and paste it above your program with a semicolon to declere a function