アットウィキロゴ

ふぃぇ 01

#include <stdio.h>

int main(void)
{
FILE *fp;
int c;

fp = fopen( "test.txt", "r" );  
if( fp == NULL )
{
puts( "test.txtが開けません" );
return 1;
}

c = fgetc( fp );      
if( c != EOF )
{
printf( "%c\n", c );  
}

fclose( fp );
return 0;
}
最終更新:2009年12月02日 04:36