I would use strchr to find each space in the string.
From every space, print the entire string, beginning from the beginning, to the place where strchr found a space.
Then use strchr again to find...