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:
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)
- Can C++ reference member be declared without being initialized with declaration?
- Facts and Question related to Style of writing programs in C/C++
- Storage of integer and character values in C
- Vantieghems Theorem for Primality Test
- Cauchy's Mean Value Theorem
- Nesbitt's Inequality
- G-Fact 21 | Collatz Sequence
- G-Fact 20 (Cayley's formula for Number of Labelled Trees)
- G-Fact 19 (Logical and Bitwise Not Operators on Boolean)
- G-Fact 18 | Finding nth Fibonacci Number using Golden Ratio
- G-Fact 17
- G-Fact 16
- G-Fact 15



