- Write a program that reads in an input text file and differentiates between C source files (typically include a #include directive towards the beginning and are case sensitive), HTML files (typically include the case-insensitive <html> and </html> tags towards the beginning and end respectively), and ‘other type’ of files. The program is permitted a margin of imprecision.
Im aware to the point on how to call a text file and how to open an HTML file, but how do I "differentiate" between the files? Your help would be appreciated
FILE *fp;
fp = fopen("test.txt", "w+");
fprintf(fp, "bla bla bla...\n");
fputs("This is testing for fputs...\n", fp);
fclose(fp);