Question: THIS NEEDS TO BE CODED IN C PLEASE! CS 2123-001 Data Structures Instructor Dr. Turgay Korkmaz Homework 3 Due date: check BB Learn !! NO

THIS NEEDS TO BE CODED IN C PLEASE!

THIS NEEDS TO BE CODED IN C PLEASE! CS 2123-001THIS NEEDS TO BE CODED IN C PLEASE! CS 2123-001

CS 2123-001 Data Structures Instructor Dr. Turgay Korkmaz Homework 3 Due date: check BB Learn !! NO LATE HOMEWORK WILL BE ACCEPTED!!! (Command-line Arguments, Files, Abstract Data Type Library) You are asked to write a program to check if the HTML tags in a given file are nested correctly or not. This problem is similar to the example of proper matching of { [ ] ) } , but now you wl deal with HTML tags and read them from a file. So you need to use stack ADT as we discussed in class [ First get booklib.zip and 08-Abstract-Data-Types.zip from the class web page. For this, click the link "programs from the textbook" under online materials. Then click 00-zip-files. Get README.txt and read it. Accordingly, get other files as described in it ] The implementation in 08-Abstract... has the stack library implementation and a driver program (rpncal.c) for RPN calculator. During the recitation you will modify it. But for this homework, you need to write a new application program (say htmlchecker.c), which will use the stack lib as rpncal.c does. So you will use the existing implementation of stack library, but in your new application since you will push/pop html tags (strings), you need to make sure stack.h has typedef void *stackElementT; I or typedef char *stackElementT; Background HTML files consist of regular text and tags enclosed in angle brackets, the symbols. Tags are used to identify the structure of a document. Most tags come in pairs: a beginning tag and a closing tag. For example, the tags and are the beginning and closing tags. There are several such tags including

etc. Tags may have several attributes and such attributes will be in the beginning tag for example link HTML allows two-sided tags to be nested without overlapping, as in the example of proper matching of Some tags are single-sided (eg,,
,
) and they appear alone. They will not affect the nesting but you still need to process them since they might be in the file. You can simply ignore the tags start with Also the file may contain HTML comments such as -> Your program should ignore everything between

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!