> Write a function that returns the last character of the string passed to it. Here is the prototype char last_character(c

Write a function that returns the last character of the string passed to it. Here is the prototype char last_character(c

Posted at: 2014-12-18 
It's a comfortable one-liner.

char last_char (const char * String) { return (String [strlen (String) - 1]); }

Think it through.

start the function passing it the string

check the length of the string

Use that length to determine which character you want

retrieve that character.

return the character

Now, turn each of those statements into code.