Q: What's the correct declaration of main()?
A: There are two valid declarations:
int main(void) int main(int argc, char **argv)although they can be written in a variety of ways. The second parameter may be declared char *argv (see question 6.4), you can use any names for the two parameters, and you can use old-style syntax:
int main() int main(argc, argv) int argc; char **argv;
See also questions 11.12b to 11.15.
ISO Sec. 188.8.131.52.1, Sec. G.5.1
H&S Sec. 20.1 p. 416
CT&P Sec. 3.10 pp. 50-51