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 # Example for Feb 2nd, 2019:\$ ./month-day 2019 33Feb 02, 2019class- monthAndDay.c -#include /* monthAndDay function's prototype*/void monthAndDay(int year, int yearday, int *pmonth, int *pday);int main() {return 0;}
# Example for Feb 2nd, 2019:\$ ./month-day 2019 33Feb 02, 2019
class- monthAndDay.c -
#include /* monthAndDay function's prototype*/void monthAndDay(int year, int yearday, int *pmonth, int *pday);int main() {return 0;}
/* monthAndDay function's prototype*/void monthAndDay(int year, int yearday, int *pmonth, int *pday);
int main() {return 0;}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here