Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | ** EPITECH PROJECT, 2023 | ||
3 | ** my_rev_params | ||
4 | ** File description: | ||
5 | ** Prints all the arguments (argc and argv) in reverse order | ||
6 | */ | ||
7 | /** | ||
8 | * @file my_rev_params.c | ||
9 | * @brief The file containing the my_rev_params function | ||
10 | * @author Nicolas TORO | ||
11 | */ | ||
12 | |||
13 | #include "my.h" | ||
14 | |||
15 | 1 | void my_rev_params(int argc, char **argv) | |
16 | { | ||
17 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 times.
|
3 | for (int i = argc; i > 0; i--) { |
18 | 2 | my_putstr(argv[i - 1]); | |
19 | 2 | my_putstr("\n"); | |
20 | } | ||
21 | 1 | } | |
22 |