Hi, I was just playing around with Pig Latin & I came across this codes somewhere. I was trying to debug it, there was no error but I got weird error like this.
Input: happy
Pig Latin: 汤汤汤汤汤汤汤汤汤汤汤汤汤汤汤汤汤汤汤汤汤 appyhay
In line 23 you set piglatin to the address word holds, meaning that the memory pointed to by piglatin is never modified. It just happens that word follows piglatin on the stack so when you print out the junk contained by piglatin which doesn't contain a nul character to signal the end of a c-string, it keeps going until it reaches the nul character terminating word.