#include <stdio.h>
int main(void)
{
FILE *fp;
fp = fopen("d:\\test.txt","w");
if (!fp) return 1;
fprintf(fp, "%s\n", "C Programming");
fprintf(fp, "%s\n", "Is The Best");
fclose(fp);
return 0;
}
/*
run: (the content of d:\\test.txt)
C Programming
Is The Best
*/