mycat.c

来自「3司 机售票员同步模型 3司机售票员同步模型」· C语言 代码 · 共 25 行

C
25
字号
/* mycat */#include "stdio.h"int main (int argc, char* argv[]){    int i = 1;/*argc[0] is the name of the command*/    FILE *fp = NULL;    char c;    while (i < argc)    {        if ((fp=fopen(argv[i++],"r")) == NULL)/*Can not open the file*/            continue;                /*Read the ith file and print*/        c = fgetc(fp);        while (c != EOF)        {            printf("%c", c);            c = fgetc(fp);        }        fclose(fp);    }    return 0;}

⌨️ 快捷键说明

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