Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Program in \"C\" language Write a function: which is given a month and year and

ID: 642116 • Letter: P

Question

Program in "C" language

Write a function:

which is given a month and year and returns the number of days in that month. You should use your is_leap() function as needed to determine the number of days in the month (February has an extra day in leap years). Put the code for the function days_in_month() in the file days.c, and the prototype in the file days.h

Write a driver, main(), to ask the user to enter the month and year (use EOF to terminate the program) and prints the number of days. Put the driver in the file driver2.c. You will compile this program with the command:

which will compile and link the source files days.c leap.c and driver2.c to create an executable called driver2.

Explanation / Answer

driver2.c

days.c

days1.h

driver1.c

leap.c

leap.h