#include //for the functions fopen and fclose #include //for EXIT_SUCCESS and EXIT_FAILURE /* This C program creates an output file named outfile.txt in the current directory. */ int main() { FILE *const outfile = fopen("outfile.txt", "w"); //"w" for "write" fprintf(outfile, "Hello.\n"); //Pass a pointer to a function. fprintf(outfile, "Goodbye.\n"); fclose(outfile); return EXIT_SUCCESS; }