I assume you know how to check each character in the string, but do not know how to determine if the character is a number, letter or puntuation.

Have a look at 'ctype.h'

It contains functions...