sizeof returns a number representing number of bytes. If you want number of elements (I am assuming) then you want to use strlen which will returns a number equivalent to (sizeof str2) / (sizeof *str2) which is the same as number of characters in the string.
But now that I think of it, sizeofchar is 1; so I guess your code still works the way you have it, but it is a good idea to know that sizeof does not return number of elements but instead the size in bytes of the variable
As for replacing printf with puts, that was just a way of making each string appear on a new line. So you can ignore it if you want