Main, the right way
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stddef.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int fixed_main( | |
size_t argc, | |
char const (*const (* argv)[argc + 1])[]) | |
{ | |
for (size_t i = 0; i < argc; i++) | |
{ | |
printf("%s\n", (*argv)[i]); | |
} | |
return EXIT_SUCCESS; | |
} | |
int main(int argc, char* argv[]) | |
{ | |
return fixed_main(argc, argv); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment