Is that what you're looking for?
int main (int argc, char * argv)
FILE * fp = NULL;
int c = 0;
if (argc == 2)
if( (fp = fopen(argv, "r" )) != NULL)
while( (c = fgetc( fp )) != EOF )
if( c == '<' )
do printf( "%c", c ); while( (c = fgetc( fp )) != EOF && c != '>' );
fclose( fp );
printf("Error opening file.\n");
The command line arguments could be handled a bit better in this example, but it will get a file open for you to do your work.
I created a file, and put this in it:
and it printed the bold html tags.