Of course it will return something, but the point is that you have no idea hat that could be....Quote:
Originally posted by moi
the program WILL return something to the operating system. if you void main (), then either:
1: the compiler will correct your error and return a value to the os
2: random garbage will be returned to the operating system
3: your program will crash
When the runtime assignes the return value to the int which it sends to exit(), it simply does a mov instruction on the value of the EAX register......
It doesnt access memory or anything so you wont experience a crash, but its still very bad practice and if the runtime was part of the code you were compiling then it wouldnt even compile with a void main