Pointer with an array passing to function