char strlast(char *s) { if (!*s) return 0; while (*s) ++s; return *--s; } /* Above this line is the solution. */ /* Below this line is a sample program that checks the solution. */ void check(char *s) { printf("The last character of %s is %c.\n",s,strlast(s)); } int main(void) { check("less fried food"); check("more aerobic exercise"); return 0; }