Hello
Test1:"<? ? ! "
Test2:"<4294967295>"
Test3:"<4294967295>"
Good bye
You can see test2 and test3 work OK, they are 13 characters long. So why in test2 I need 39 cells? Why it doesn't work with 13 cells in test1, but does work in test3 with also 13 cells?!?
If you use a variable out of scope like that the results are undefined. Undefined means it may or may not "seem to work" depending on external factors. For example, allocating a large variable may keep the corruption to a part of the stack that isn't important. The thing is, test1 and test2 are wrong. Passing the variable in (as in test3) is valid.
You can make up tests like that all day and get different results. The way the compiler allocates temporary variables may affect things. It might "inline" the function in one place and not another. Once you "break the rules" and use variables when they are out of scope (eg. doing malloc/free and then continuing to use the allocated memory) then all bets are off. It may "work", for a while, it may not.