adplus-dvertising
frame-decoration

Question

According to ANSI specifications which is the correct way of declaring main when it receives command-line arguments?

a.

int main(int argc, char *argv[])

b.

int main(argc, argv)int argc; char *argv;

c.

int main(){ int argc; char *argv;}

d.

None of above

Posted under C Programming

Answer: (a).int main(int argc, char *argv[])

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. According to ANSI specifications which is the correct way of declaring main when it receives command-line arguments?