In C, there's a difference between the declarations int main();
and int main(void);
(the former declares a function with an unspecified number of arguments, and the latter is actually called a prototype). However, in the function definition, both main()
and main(void)
define a function that takes no arguments.
The other signature, main(int, char**)
, is an alternative form. Conforming implementations must accept either form, but may also accept other implementation-defined signatures for main()
. Any given program may of course only contain one single function called main
.