Dynamic array output array

what is the point to have dynamic memory allocation for the output array