Quote Originally Posted by Salem View Post
As soon as you realise that having more than one source file would be a good idea, most of the "prototype or not" arguments go away.

> Are there also other benefits to putting your non-main functions after main?
If you prefer a top-down view of the program, you get to see main() first just by scrolling through the code.


There are other oddities in your short example.
- using a while loop where a for loop would have made more sense.
- using parentheses on the return statement.
Oh, well as i explained, the code isn't mine. I wouldn't put parenthesis around a return value because it's more typing. Also, i see your point about the for loop, because we wouldn't have to declare the value for the loop above.