Question
* To be written in C language * Develop and test a utility program called htags that analyses an HTML file and prints of the
* To be written in C language*
Develop and test a utility program called htags that analyses an HTML file and prints of the list of the HTML tags names together with the number of occurrences of each tag. Use the following simplified definition of the HTML tag names:
The tag name starts immediately after the < character, and consists of one or more non blanc characters other than / and is terminated by either the space character or by the > character. For example, in the sample excerpt of the html file:
CS 2263
Assignment 1
we find the body and div tags occurring only once, and the p, b and span tags occurring twice each. Note that /span, /b and /p are not counted as tags. The data to your program should be read from the standard input (use the input redirection to read the entire HTML file). Print one tag name, followed by the tag count, per line. Put comments in your code. The assignment submission should consist of the following parts:
1. Focus on the description of the programming modules (procedures) and the data structures needed to complete the task. (Note: use arrays to store the tags. You may restrict your solution to the maximum of 100 tags, and each tag to be less than 10 characters long.)
2. Show the complete source code of every programming module.
3. Show the testing of one of the modules (report on testing of just one of the modules).
4. Show the gcc compiler statement used to compile all the modules into the single executable.
5. Show the output from running your program on the following text: TEST
6. Show the output from running your program on this HTML file, i.e. the very file describing this assignment.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started