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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.