c++ - Where is the return value of int main() is stored? -


this question has answer here:

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

Popular posts from this blog

Lists in Python -

android - can not access to progress bar in an other activity -

java - Vaadin 7 Pass Data Between Views -