Does it matter if the function definition is before the int (main) or after the int main?
I've seen it both ways and am trying to find the proper way to display the function definition and declaration.
No .. it doesn't. Its a matter of preference. Choose which you prefer and be consistent!
The function definition (which contains the actual code) can be anywhere, even in a different file, as long as the declaration (the function prototype) appears before you call the function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With