It doesn't work because line 4 doesn't do anything. This function will convert the entire sentence to all upper-case. Hope that's what you want to do.
Or simplify with
void printSentence(char *sentPtr){
char *sent = sentPtr;
while(*sent)
{
*sent = toupper(*sent++);
}
*sent++ = '.';
*sent = 0;
cout << sentPtr << endl;
}
toupper()
by definition only sets lower case letters to uppercase and will leave all other characters alone.