No, having main at the bottom is not good, it makes the reader have to search for main, which is the place to start when analyzing code and it gets annoying. Sometimes for small programs, where you only have a couple functions other than main it can be more convenient to have a single source file. This generally is ok but at some point it becomes unwieldy. Having each function in a separate file, named after the function, allows you to quickly navigate to the function you need in most IDE's.It would seem to me that the best practice would be to have int main() at the bottom of all code. Why would you write code beneath the main() function?
There is nothing wrong with having a void return type. Windows and Linux generally prefer that you return int though. When coding for microcontrollers it is generally bad to return type int, as stack and ram space are at a premium and you should generally avoid frivolous reservations, like the space it takes to represent return 0 versus return. 4 bytes may not seem like much, unless you are dealing with 2k of ram.Also, in a book entitled "Practical C++" by Robert W. McGregor, in example code, the main() function always has the return type void instead of int. Why is this? I thought the main function always has to be int? Or does it just depend on the compiler/platform?