# include & ltstdio.h & gt
# include & ltconio.h & gt
int main (void )
{
char str[20]={NULL}, temp
int length = 0
int primero; espacio = 0;
int i=0, j=0, k = 0
Printf("Ingrese:\ n "); (cadena);
temp = str[0];
mientras(temp!='\0')
{
i++;
temp = str[I];
}
Longitud = I;
printf("\nLa salida inversa es : \n ");
for(I=longitud-1;i>=0;i-)
{
if(str[i] = = ',')
{
primer espacio = I;
j = I+1;
mientras((str [ j]!= ' \ 0 ')&&(str[j]!=','))
{
printf("%c ",str [j] );
j++;
}
printf("%c ", str[I]);
}
}
for(I = 0;i<firstSpacei++){
printf("%c ",str[I]);
}
getch();
Devuelve 0;
}
Instancia en ejecución:
Ingrese: p>
Yo, te amo
La salida inversa es:
Tú, me encanta