i just did it five times and it did was i supposed to. i know its not a pointer to a string. it takes a char * so it * points to the & of my char. its not undefined
It is simply fortune that in this simple program your variable are followed by a memory cell with zero. Nevertheless your code has undefined behaviour, Simply speaking it is a bad code.