Function Prototype Example?
I've been struggling to understand this concept for a while, I know it has been asked before but I still need clarification. What I've gathered from research and posts are: 1) A function prototype can be used to declare a function without it's body first-hand letting the compiler know what arguments it takes, the function name and its return type. I don't see the point of letting the compiler know only about the header of the function, when you can let it know all about it at once. 2) Projects usually consists of multiple files and function prototypes let the compiler know it exists in another file. Doesn't it still work the same way even without a function prototype? Is it just good practice? 3) Gives the ability to define and implement functions after it is used(below). This point seemed to only give code flexibility. What I need is an example where a function prototype is absolutely necessary and in the case of omitting it, the program fails to work. Thanks in advance