⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.c

📁 一个LINUX下一个框架文件系统,运行编译环境:RED HAT LINUX7.3
💻 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 + -