Alloca il secondo buffer e usa opportunamente la memcpy

http://www.cplusplus.com/reference/c...string/memcpy/