Maybe something like this.
Code:
#include <stdio.h>
#include <string.h>
int main()
{
static const char filename[] = "file.txt";
FILE *file = fopen(filename, "r");
if ( file != NULL )
{
char text[12];
int ready = 0;
while ( fscanf(file, "%11s%*[^\n]%*c", text) == 1 )
{
if ( ready )
{
puts(text);
}
else if ( strcmp(text, "START") == 0 )
{
ready = 1;
}
}
}
else
{
perror(filename);
}
return 0;
}
/* file.txt
info
info
info
info
START
123456 garbage
654321 garbage
Hello garbage
Goodbye garbage
*/
/* my output
123456
654321
Hello
Goodbye
*/