This project focuses on understanding and using command-line arguments in C. It covers how to handle arguments passed to a program, how to count them, and how to use them effectively in your code.
- Command Line Arguments in C
- argc and argv
- How to use argc and argv in C
- C Programming - Command Line Arguments
- How to use arguments passed to your program.
- What are two prototypes of
main
that you can use. - How to use
__attribute__((unused))
or(void)
to compile functions with unused variables or parameters.
Task | File | Description |
---|---|---|
0. It ain't what they call you, it's what you answer to | 0-whatsmyname.c | Writes a program that prints its name, followed by a new line. |
1. Silence is argument carried out by other means | 1-args.c | Writes a program that prints the number of arguments passed into it. |
2. The best argument against democracy is a five-minute conversation | 2-args.c | Writes a program that prints all arguments it receives. |
3. Neither irony nor sarcasm is argument | 3-mul.c | Writes a program that multiplies two numbers. |
4. To infinity and beyond | 4-add.c | Writes a program that adds positive numbers. |
5. Minimal Number of Coins for Change | 100-change.c | Writes a program that prints the minimum number of coins to make change for an amount of money. |