A few times now, I've encountered code like this:
int
main(argc, argv)
int argc; char **argv;
{
...
}
Why are argc
and argv
declared in this way?
This was the syntax that was used for K&R* style parameter lists.
* K&R - Brian Kernighan and Dennis Ritchie, authors of the book, "The C Programming Language."
Dennis Ritchie was also the creator of the C programming language and with Ken Thompson, the UNIX operating system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With