Added function memset() and replaced loop in function print() with
memcpy().