print subset
update: use memcpy to copy array