毎日C言語
これはLinuxでいうところのcatかな。
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
FILE *f;
char s[256];
if *1 == NULL) {
fprintf(stderr,"ERROR");
}
while(fgets(s,256,f) != NULL) {
printf("%s",s);
}
fclose(f);
}
参考URL
http://www9.plala.or.jp/sgwr-t/c/sec17.html