Authors opinions and practices are not relevant....they dont define these languages...they just teach.......To answer this question you use
Originally posted by Ride -or- Die
Notice with void there is no return in the last line of the code. Hence void is
indicating that that is no value that will be returned.
Using any data type in front of main, indicates the type that will be returned.
Notice the return (0); or return 0; both are acceptable in the last line of your
code. Basically a value of int is being returned by the return 0. Actually no
value is being returned. The return 0 indicates to the compiler that the
program ran successfully. Yes, I will be going over this in class. Different
books will present void initially and a data type return indication later or
just stay with the data type return indication. A lot of opinions on the merits
of void by a lot of authors.
Hope this helps.