для вставки пробела вам просто нужна эта модификация (при условии, что все остальное работает):
void reverse(char *str)
{
char sent[100];
int i=lenght(str);
int t=0;
while(i>=-1)
{
// if str[i]==0 is not needed since you already start from the last char
// (if it would have start from from the null char which end the string,
// your app will crash when you try to access out of boundary array str[k] (where k is i+1)
if(str[i]==' ' || i==-1)
{
int k=i+1;
while(str[k]!=' ' && str[k]!='\0')
{
sent[t]=str[k];
k++;
t++;
}
// after having the reversed word lets add the space,
// but let's not add it if we are in the end of the sentence:
if(str[i] == ' ')
{
sent[t] = ' ';
t++;
}
}
i--;
}
// INPUT: THIS SENTENCE IS AN EXAMPLE
// VARIABLE SENT= EXAMPLEANISSENTENCETHIS