reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include <stdio.h> #include <string.h> #include <stdlib.h> /* This program writes its arguments (separated by '\0') to stdout. */ int main(int argc, char const *argv[]) { int i; FILE *output = fopen (argv[1], "w"); if (output == NULL) exit (1); for (i = 2; i < argc; ++i) fwrite(argv[i], strlen(argv[i])+1, 1, output); fclose (output); return 0; } |