A command-line argument is a string supplied when a program is invoked. In C, a form of main receives these strings through argv: int main(int argc, char* argv[argc+1]);. The program decides how to interpret their contents. section 7.2
Converting an argument
double const a = strtod(argv[i], nullptr); converts the string at argv[i] to a double value. The argument arrives as a string even when the program intends to use it as a number. section 7.2
The argv array has two special entries: argv[0] points to the name of the program invocation, usually the executable name, while argv[argc] is a null pointer. The null pointer marks the end of the array; argc can be used to process its entries. section 7.2
Arguments to a compiler
The command c17 -Wall -o getting-started getting-started.c -lm invokes a compiler with several arguments. Compiler names and command-line arguments depend on the platform. section 1.2
TAKEAWAY: Command-line arguments arrive as strings; interpreting them is the program’s responsibility. They are distinct from arguments in a C function call, whose values are passed to the called function. section 7.2 section 2.4.2













