Microsoft interview question

write a code snippet to implement memcopy function.