Anyone can explain and write out a simplier code of similiar function to the one below...the code is to invert the individual words in a sentence.
#include<stdio.h>
#define SP ' '
char*p(char*t)
{
char*s;
*t&&*t!=SP&&((s=p(t+1))==s)&&putchar(*t);
return(*t?(*t==SP?t:s):NULL);
}
int main(void)
{
char*t="i am ok";
while(t=p(t))
putchar(*t++);
}