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

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -