Month Day Calculator in C Using basic concepts of Pointers and Structures (Pointers and Multi-dimensional arrays), create a C program that calculates the month's day from a given year and year's day. Use pointers for the month and month's day variables. Don't forget to add proper errors handling in your program. - Follow the instructions below for handling error. - Invalid Input - Invalid year - Invalid year day Modify the provided monthAndDay.c class file to receive the parameters in the way and also print the proper formatted output. Example:
Month Day Calculator in C
Using basic concepts of Pointers and Structures (Pointers and Multi-dimensional arrays), create a C
- Follow the instructions below for handling error.
- Invalid Input
- Invalid year
- Invalid year day
Modify the provided monthAndDay.c class file to receive the parameters in the way and also print the proper formatted output.
Example:
# ./month_day <year> <yearday>
# Example for Feb 2nd, 2019:
\$ ./month-day 2019 33
Feb 02, 2019
class- monthAndDay.c -
#include <stdio.h>
/* monthAndDay function's prototype*/
void monthAndDay(int year, int yearday, int *pmonth, int *pday);
int main() {
return 0;
}
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 5 images