I put an extra print statement in the parent part to print out nb after each read from the pipe.
The first read gets 32 characters, the other 6 reads get 0 characters. Each time you are printing out the first character of word, which hasn't changed (because nothing got read from the pipe).

I think that the problem is you've told the read statement you want sizeof(word) characters, so it doesn't return to parent until it either has that many characters or the pipe is closed. But Ive not done much with pipes, so I'm not certain.

Perhaps you should try reading a single character at a time, building up word until you get a space or return ?

This means you are also writing the trailing NULL at the end of each "token".

Next problem - your parent process is waiting until the child has exited before it starts reading from the pipe.So as you are asking for sizeof(word) characters, it is reading the entire contents of the pipe at once.BUT, because you have put the trailing NULLs after each token, you only get to see "I" in word.

You can cure the first problem by using this statement to write to the pipe

But I think you might have to do something to get the child to wait until the parent has read the pipe before it writes the next token to cure the second problem, as even when I took out the wait statement, it still didn't put anything out from the parent before the child had finished writing.