return value of main() in windows - by sisis In Linux, the return value of the main function is stored in $?, and can be shown using echo $?. Is there something equivalent in Windows? Read the article