求C 语言编程/*要按要求*/Give a text file named Holidays.txt with the
求C 语言编程
/*要按要求*/
Give a text file named Holidays.txt with the data format as following:
0101 New Year’s Day
1001 National Day
…
(1)Write a function getHolidays(char* filename, char holidayList[]) that
reads the list of holidays from the file Holidays.txt to the holidayList,
then displays the current list of holidays. If the Holidays.txt file is not
existed, just create the file in your program. The getHolidays() function
should return the actual size of the holidays list.
(2)Write a function named sortList(char holidayList [], int listLength) to
sort the holidays.
(3) In main() function, first calls getHolidays() to get list of holidays, and
displays the current list of holidays, then show the user-choice list. The
user can add or delete a holiday, or quit the program according the
choice.
(4)When the user selects add or delete a holiday, after the holidays have
been modified, the program should calls the sortList() and then display
the new list.
(5)When the user selects quit, if the holiday has been modified anyway,
the program should ask the user whether the new list should be saved;
if the user responds affirmatively, the function should write the new
data to the existing Holidays.txt file, overwriting the contents of the
existing file.