[quote author=Nick Gammon link=topic=106013.msg797614#msg797614 date=1337298880] Assuming you are correct about the shallow copy, you still need to have the array in the caller (for it to be copied into). So you don't achieve anything over passing that other array by reference anyway.
When the return type of the function is a struct, the space for the return value in the stack frame is the size of the struct (significantly, in this case, [u]including the array elements[/u]). The struct contains the array elements, not a pointer to the array. So you can execute:
Name myName = getName();
The return statement does a shallow copy of the struct (including the content of the array) into the return stack frame, and then as the call completes the return value is copied from the stack frame to the myName variable. It is exactly the same as when a scalar type is returned, except that it is applied to the entire struct.
The semantics of struct assignment and array assignment are very different in this respect. It's an inconsistency that was introduced to the language spec at a very early stage and is now so entrenched that I don't see it ever being corrected.