文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>C语言实例55:打开和关闭文件

C语言实例55:打开和关闭文件

时间:2010-07-02  来源:hnrainll

#include <stdio.h>
#include <stdlib.h>

int main()
{
    FILE *fp;
    char ch, filename[10];

    printf("Pleas input the name of file:");
    scanf("%s", filename);

    if((fp = fopen(filename,"r")) == NULL)
    {
        printf("Cannot open the file.\n");
        exit(0);
    }

    fclose(fp);

    system("pause");
    return 0;
}


相关阅读 更多 +
排行榜 更多 +
射击枪神

射击枪神

飞行射击 下载
学历万题库

学历万题库

学习教育 下载
塔防奇兵模拟

塔防奇兵模拟

音乐节奏 下载