Write a function called increment that accepts a date structure with three fields. The first field contains the month (a pointer to a string). The second field is an integer showing the day in the...


Write a function called increment that accepts a date structure with<br>three fields. The first field contains the month (a pointer to a string). The<br>second field is an integer showing the day in the month. The third field is<br>an integer showing the year. The function increments the date by 1 day<br>and returns the new date. If the date is the last day in the month, the<br>month field must also be changed. If the month is December, the value<br>of the year fiekl must also be changed when the day is 31. A year is a leap<br>year if<br>a. It is evenly divisible by 4 but not by 100, or<br>b. It is evenly divisible by 400.<br>

Extracted text: Write a function called increment that accepts a date structure with three fields. The first field contains the month (a pointer to a string). The second field is an integer showing the day in the month. The third field is an integer showing the year. The function increments the date by 1 day and returns the new date. If the date is the last day in the month, the month field must also be changed. If the month is December, the value of the year fiekl must also be changed when the day is 31. A year is a leap year if a. It is evenly divisible by 4 but not by 100, or b. It is evenly divisible by 400.

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here