Microsoft interview question

Implement memcopy functionality