c++ - Where is the return value of int main() is stored? -
this question has answer here:
- what should main() return in c , c++? 19 answers
in program below, value of return 0
stored , mean?
#include <iostream.h> int main() { cout<<"hello world"; return 0; }
the return value of main()
typically return value of process (e.g. if called command line). exact storage location , transfer mechanism calling shell (or parent process) defined platform being targeted.
a return of 0
(exit_success
) typically means program completed without error. non-zero values in turn indicate error - program define exact meaning each value be.
Comments
Post a Comment