My only exposure to programming has been Java,where I have not encountered (up to now) different conventions for writing the main method.I have been following to sources for learning c (K&R AND C Programming A Modern Approach) where they use very different forms of the main method (function).
K&R version up to now:
main() {
blah blah blah;
}
C Programming A Modern Approach
int main() {
blah blah blah;
return 0;
}
OR
int main() {
blah blah blah;
//returns nothing
}
To make matters more confusing I have seen people do :
int main(void) {
blah blah blah;
}
while they either returned 0 or did not. I don't in my very uneducated assumption think this is only a standards issue but maybe something a bit more conceptual or deep. Could someone shed some light on this issue?