fputs.c
#include <stdio.h>
int main(void){
FILE *fp;
char str[] = "ABCDE";
fp = fopen("test.txt", "w");
if (fp == NULL){
printf("Can't open file!\n");
return -1;
}
fputs(str, fp);
printf("fputs: %s\n", str);
fclose(fp);
return 0;
}
最終更新:2010年07月08日 14:54