- This box may be an unknown value. When the array length is 20, before you encounter the value on your computer, you encounter the '\0' terminator and print it out. When the array length is 50, this unknown value on your computer is right before you encounter the '\0' terminator, so it is printed. The box is displayed because the value here has no corresponding character library on your computer.
- suggests that str1[str1_lenght + i] = '\0' be given a terminator at the end of the string concatenation. No matter how long the array is, the output should be fine.