5.1.2.2.3 Program termination

Previous Table of Contents "New C Standard" commentary

180 If the return type of the main function is a type compatible with int, a return from the initial call to the main function is equivalent to calling the exit function with the value returned by the main function as its argument;10)

181 reaching the } that terminates the main function returns a value of 0.

182 If the return type is not compatible with int, the termination status returned to the host environment is unspecified.

183 Forward references: definition of terms (7.1.1), the exit function (7.20.4.3).

Next

Created at: 2008-01-30 02:39:39 The text from WG14/N1256 is copyright © ISO