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[]) |
chevron_right
filter_none
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:
Recommended Posts:
- GFact 22 | (2^x + 1 and Prime)
- GFact 23 | (Brocard’s problem)
- Interesting and Cool Tricks in Java
- How to Install and Configure MongoDB in Ubuntu?
- Interesting Facts About Perl
- 10 Interesting Facts About Computers
- Interesting Facts about DBMS
- Can C++ reference member be declared without being initialized with declaration?
- Facts and Question related to Style of writing programs in C/C++
- Dilworth's Theorem
- Storage of integer and character values in C
- Vantieghems Theorem for Primality Test
- Cauchy's Mean Value Theorem
- Nesbitt's Inequality
- GFact 23 | (Brocard’s problem)

