test.c

来自「socket编程」· C语言 代码 · 共 24 行

C
24
字号
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

main()
{
FILE *fp;
fp=fopen("test.txt","w+t");
fprintf(fp," fprintf:hello\nworld"); 
fputs(" fputs:hello\nworld",fp);     

fclose(fp);

fp=fopen("test.bin","w+b");
fprintf(fp," fprintf:hello\nworld");
fputs(" fputs:hello\nworld",fp);     

fclose(fp);



}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?