#include <stdio.h>
#include <stdlib.h>
int main(void)
{
char sentence[100] = "I like programming";
FILE *fp;
fp = fopen("d://data.txt", "w");
if (fp == NULL)
{
printf("Error Open File");
exit(1);
}
fprintf(fp,"%s", sentence);
fclose(fp);
return 0;
}
/*
run:
data.txt
--------
I like programming
*/