It is possible because the sizeof operator is reporting the size of the pointer you passed into your function. The "size" information is lost when you pass an array into a function, so if you actually need to know the sizeof your array you need to pass this into the function as well.
However in this case you probably want to know the length of the string, not the actual sizeof the array. You can get the length of a C-string by using the strlen() function. But really you should be using C++ strings instead of C-strings, since they know their own sizes and are much less error prone.
jlb I agree with your remark about using c++ strings. c-strings are a pain in the butt, but this was extracted from a book exercise dealing with arrays and such, and it specifically asked for c-style strings.
Yes, but IMO that should be after it has already used C++ strings, vectors and other C++ features. It seems to me like this assignment is fairly early in the book because it looks a lot like a try at implementing a strcpy() look a like.