diff options
| author | mo khan <mo@mokhan.ca> | 2021-08-02 18:55:39 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2021-08-02 18:55:39 -0600 |
| commit | bd6100a9dcbd3e0613020bde0af738870ef51c3c (patch) | |
| tree | f923f67ca30f047fe57bf7eace8936da38bdc208 /main.c | |
| parent | 449c4d5930b5fcc6bc2791b2307f461ee6e278f8 (diff) | |
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,10 +1,13 @@ #include <stdio.h> -int main(int argc, char *argv[]) +// name: main +// parameters: + // argc: # of arguments passed to the program + // argv: argument vector. list of parameters that passed to the program +// return int which is a number +int main(int argc, char const *argv[]) { - for (int i = 0; i < 100; i++) { - printf("%d - Oh, hey Caius!\n", i); - } - + printf("number of args: %d\n", argc); + printf("args: %s\n", argv[0]); return 0; } |
