rec4: pointers, arrays, heap memory