Microsoft interview question

implement the function memcpy