#include <stdio.h> |
#include <stdlib.h> |
int main() { |
FILE *p; |
char name[] = "wuzhenlin" ; |
int i; |
if ((p = fopen ( "D:\\myname.txt" , "w" )) == NULL) { |
printf ( "无法打开此文件\n" ); |
exit (0); |
} |
for (i = 0; i < 9; i++) { |
fputc (name[i], p); |
putchar (name[i]); |
} |
return 0; |
} |
中级程序员
by: LinKin 发表于:2019-10-28 08:58:27 顶(0) | 踩(0) 回复
牛掰
回复评论