CS288 Intensive Programming Homework

Homework 5 on structure handling with linked lists

Continuing on Homework 3 but this time using C structures, design and implement a C program that handles what you did in Homework 3. Use the skeleton code attached. Fill the structure with all four values: views, user, times, titles.

  1. Use the CSV file (comma sepearated value file) you created in HW3, where each line consists of titles, user, upload-time, duration, and views. Since titles and users may contain commas, you need to convert those pre-existing commas to something else such as MY_COMMA or something of that sort. Later on you can revert MY_COMMA back to real commas when everything is said and done.
  2. Use strtok() function to split a line into five fields with "," as the delimiter. As cautioned above, you need to convert commas to something else which can then be reverted back to commas after you have built a list.
    insert_at_end(char *s) will insert not just user but all the remaining values as well.