21 lines
351 B
C
21 lines
351 B
C
#include <stdio.h>
|
|
|
|
void process_record( char *buf )
|
|
{
|
|
printf( "%s\n", buf );
|
|
}
|
|
|
|
void main( void )
|
|
{
|
|
FILE *fp;
|
|
char buffer[100];
|
|
|
|
fp = fopen( "file", "r" );
|
|
fgets( buffer, sizeof( buffer ), fp );
|
|
while( ! feof( fp ) ) {
|
|
process_record( buffer );
|
|
fgets( buffer, sizeof( buffer ), fp );
|
|
}
|
|
fclose( fp );
|
|
}
|