main() {
char c, file1[30], file2[30];
int fd1, fd2, html;
printf("Enter Input File Name : \n");
gets(file1);
printf("Enter Output File Name: \n");
gets(file2);
fd1 = fopen(file1,"r");
if (fd1 == NULL) {
printf("Did not open file: %s",file1);
abort(1);
}
fd2 = fopen(file2,"w");
if (fd2 == NULL) {
printf("Did not open file: %s",file2);
abort(1);
}
html = NO;
while (( c = getc(fd1)) != EOF) {
if ( html == NO ) {
if ( c == '<' )
html = YES;
else
putc(c,fd2);
}
if ( html == YES ) {
if ( c == '>' )
html = NO;
}
}
fclose(fd1);
fclose(fd2);
}
```
Example HTML file:
```
Title of Document
Level 1 Text
This is a paragraph. This is a paragraph.
This is a paragraph that will wrap in the
browser until the end paragraph marker.
The Paragraph marker is also used to create
a blank line of text.
```