A:
SimpleLogic(char myStr[]) // pass the string
{
char *t=myStr;
while(*t)
if(*t==' ')
*t++='\0';
else
++t;
--t;
while(t>myStr)
if(*t=='\0')
--t;
else
printf("%s\n",(t-- + 1));
printf("%s",myStr);
}