Question: C language problem is below, would anyone be able to provide a working solution please? Input n (1
C language problem is below, would anyone be able to provide a working solution please?
Input n (1<=n<=10000) and then followed by n lines. Each line corresponds to a valid date, consisting of one string ("January", "February", ..., or "December"), one integer between 1 and 31, and one two digit integer representing the year (from 90 to 99, and then from 00 to 12). You do not have to worry about date validation. All dates in the input are valid dates. Please use structures to store the dates. Please use malloc to dynamically allocate just enough space for n structures.
You are asked to sort the dates chronologically using the built-in qsort function. Please output the sorted list, one date per line, from most recent date to oldest. Please also use the built-in bsearch function to allow for a user query to check whether a specific date is in the list, and output either "Yes" or "No".
Input
n, the number of dates to sort,
followed by n dates (i.e January 18 01 or June 7 98
followed by a user query in format day month year (e.g. 1 1 00 or 31 3 68). (Note this is a different format as the rest of the dates are presented in)
Output
Sorted list of dates,
followed by Yes or No to indicate whether the query date input by the user (e.g. 1 1 00 day month year) is in the list.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
