K&R C Programs Exercise 5-9
Exercise 5-9. Rewrite the routines day_of_year and month_day with pointers instead of indexing. Replace every daytab[leap][i] with pointer arithmetic. The key step: instead of indexing into the 2D array, take a pointer to the correct row (const char *p = daytab[ly]) and use p[i] or *(p + i) to access elements. The loop variable can …