📄 test.c
字号:
#include <stdio.h>
int main()
{
FILE *fp;
char buf[100];
printf( "Please input file name:" );
scanf( "%s", buf );
if ( fp = fopen( buf, "wb" ) == NULL ){
printf( "Could not open the file %s.\n" , buf );
return -1;
}
else printf( "file openned successfully!\n" );
printf( "Please input(<100):" );
scanf( "%s", buf );
if( fputs( buf, fp ) == EOF ){
printf( "Error writing file!" );
return -2;
}
fgets( buf, 100, fp );
printf( "the File content is:%s\n", buf );
close( fp );
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -