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<stdio.h> | |
main( int argc, char *argv[]) { | |
FILE *output = fopen(argv[1], "w"); | |
fputs("Roses are red,\n", output); | |
fputs("Violets are blue,\n", output); | |
fputs("Rhyming is overrated,\n", output); | |
fputs("Zebra.\n", output); | |
fclose(output); | |
} |
Using the command prompt, the first argument is the file name.
While the second argument is the name of the output file you want.
No comments:
Post a Comment