G-Fact 3

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:

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


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


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.