I am a newbie of c programming.. I have no idea how to implement a linklist program in c that can read the data from a text file and how can I distinguish whether it is a command like (INSERT, DELETE) or it is an item such as apple, orange and also how can I separate the " ; " that along with each item? Anything is appreciated!!!
Implement a linked list which maintains lexical order of the string data elements. Your program will be driven by an input file (text) which gives the required commands and arguments in the form described below.
Textfile:
INSERT apple; INSERT orange; INSERT pear; INSERT mango; INSERT pawpaw; INSERT banana; INSERT grape; DELETE mango; DELETE apple; INSERT strawberry; INSERT peach; DELETE grape; SNAPSHOT*; INSERT mango; SNAPSHOT; INSERT cherry; QUIT
*SNAPSHOT is a dump of the data values in the list.
Implement a linked list which maintains lexical order of the string data elements. Your program will be driven by an input file (text) which gives the required commands and arguments in the form described below.
Textfile:
INSERT apple; INSERT orange; INSERT pear; INSERT mango; INSERT pawpaw; INSERT banana; INSERT grape; DELETE mango; DELETE apple; INSERT strawberry; INSERT peach; DELETE grape; SNAPSHOT*; INSERT mango; SNAPSHOT; INSERT cherry; QUIT
*SNAPSHOT is a dump of the data values in the list.