Is void main(void) ANSI standard??

Doug Gwyn gwyn at smoke.brl.mil
Wed Mar 13 04:34:52 AEST 1991


In article <1991Mar11.085439.1 at sysjj.mdcbbs.com> hooverm at sysjj.mdcbbs.com (SQUID 6 on the DARK side) writes:
>Is this ANSI standard?

No, there are only two strictly conforming interface definitions your
program can use, int main(void) and int main(int argc, char **argv).
You should always terminate by invoking the exit function or by
returning a value from the main function.  The return value zero is
appropriate when you are not trying to report an error to the environment.



More information about the Comp.lang.c mailing list