Functions that converts day of year to month and day and reverse with error checking
Incorrect yearday limit

// if((leap == 1 ... || (leap == 0 &amp;&amp; (yearday &gt;= 1 &amp;&amp; yearday &lt;= 366))) {
if((leap == 1 ... || (leap == 0 &amp;&amp; (yearday &gt;= 1 &amp;&amp; yearday &lt;= 365))) {
//                                                             365  

month_day() and day_of_year() should use consistent types for month.  Suggest int for both.

// int day_of_year(unsigned int year, unsigned int month, int day) {
// void month_day(unsigned int year, unsigned int yearday, int *pmonth, int *pday) {
int day_of_year(unsigned int year,         int month, int day) {

month_day() and day_of_year() should use consistent types for yearday.  Suggest int for both.

// int day_of_year(unsigned int year, unsigned int month, int day) {
// void month_day(unsigned int year, unsigned int yearday, int *pmonth, int *pday) {
int day_of_year(unsigned int year, int month, int day) {
void month_day(unsigned int year, int yearday, int *pmonth, int *pday) {

Leap year calculation leap = ((year... is good back to 1583.  For years 4 to 1582 it is  leap = (year % 4 == 0);  1582 has other complications.  Before 4 has complications.
Suggest month_day() return int to indicate success or failure.