Skip to content
Related Articles
Open in App
Not now

Related Articles

G-Fact 3

Improve Article
Save Article
Like Article
  • Difficulty Level : Easy
  • Last Updated : 22 Mar, 2017
Improve Article
Save Article
Like Article

In ISO C, you can define main either to take no arguments, or to take two arguments that represent the command line arguments to the program, like this:




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


Other platform-dependent formats are also allowed by the C and C++ standards; for example, Unix (though not POSIX.1) and Microsoft Visual C++ have a third argument giving the program’s environment, otherwise accessible through getenv in stdlib.h:

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!