Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Provided code #include struct date { int year; int month; int day; }; /* function prototypes */ void printDate(struct date); void readDate(struct date *); struct
Provided code
#includestruct date { int year; int month; int day; }; /* function prototypes */ void printDate(struct date); void readDate(struct date *); struct date advanceDay(struct date); int main(void) { struct date today, tomorrow; readDate(&today); printDate(today); tomorrow = advanceDay(today); printDate(tomorrow); return 0; } /* add your function definitions here */
I need help doing this activity. thanks!
Activity: manipulate structures with functions Submit Assignment Due Monday by 11:59pm Points 5 Submitting a text entry box or a file upload File Typesc In this problem you will continue developing the data feature which you started implementing in the previous problem. You will implement a "tomorrow" feature in the C programming language via a function called "advanceDay0". The function advanceDay() should take as input a date (stored in a struct date) and return the date of the following day. You do not have to take into account leap years (although you may if you wish to). That is, it is okay for your function to always return March 1 as the day following February 28, no matter the year. You are provided with a familiar date structure definition, a main function as well as the function prototypes for the readDate(), printDate(), and advanceDate() functions. Do not modify any of the given code. Simply add your function definitions underneath the main() function. For the readDate() and printDate() functions you may simply copy and paste the code you developed in the previous task. Examples Input: 2018 10 2 Output: 10/02/2018 10/03/2018 Input: 2018 10 31 Output: 10/31/2018 11/01/2018 Input: 2018 11 30 Output: 11/30/2018 12/01/2018 Input: 2018 12 31 Output: 12/31/2018 01/01/2019 Provided code #includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started