c - Return value range of the main function -


what standard main return values range? 255?

because

int main(void){ return 256; } echo $? ;  # out 0 

the standard doesn't say. 0, exit_success , exit_failure have (sort of) specified meanings. else depends on implementation.

at present time, unix-based systems support 8-bit return values. windows supports (at least) 32-bit return value. haven't checked whether 64-bit windows supports 64-bit return value, rather doubt it, since 64-bit windows still uses 32-bit int.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -