#include <stdio.h>
#define BUFFER_SIZE 64
int readln( char* s, int lim, FILE* fp ){
int c, i = 0;
while ( --lim > 0 && ( c = fgetc( fp ) ) != EOF && c != '\n' )
s[ i++ ] = c;
if ( c == '\n' )
s[ i++ ] = c;
s[ i ] = '\0';
return i;
}
int main(){
int c;
char line[ BUFFER_SIZE ], *p, *pos;
FILE *fp;
fp = fopen( "input.dat", "r" );
if ( fp != NULL ){
while ( ( c = readln( line, BUFFER_SIZE, fp ) ) != 0 )
printf( line );
fclose( fp );
}
return 0;
}
SEO | [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送 | ||