The following compiles and runs and returns 3 on gcc linux x64.
int f();
int main()
{
return f(1,2,3);
}
int f(int a,int b)
{
return a+b;
}
Why is it useful to declare a function as int f();
and later define parameters in the function's definition as in this example?