main() functions return value?

后端 未结 5 1970
夕颜
夕颜 2020-11-30 13:27

Anyone please tell me where the main() function of the \'C\' language returns its value?

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-30 13:52

    A general statement is: Function returns a value to the host environment.

    So main() will return value to any program or shell which is hosting that piece of code or to the OS.

    return value 0 is considered as successful execution

提交回复
热议问题