Void main () & int main (), voidmain
Void main () does not exist, only int main ()
The void main function does not return values. The default value of main is int type, that is, int main (). An integer is returned. Note that the new standard does not allow the use of the default return value, that is, the int value cannot be saved, and the corresponding main function no longer supports the void type return value. Therefore, in order to make the program have good portability, it is strongly recommended to use:
Int main ()
{
Return0;/* the return value of the new standard main function can be omitted */
}
Function of return value:
The Return Value of the main function is used to indicate the exit status of the program. If 0 is returned, the program Exits normally. The meaning of other numbers returned is determined by the system. Generally, if the return value is non-zero, the program exits unexpectedly.