For a program I am working on, I need to perform some operations on vectors, such as vector addition. However, I am unsure of how best to write the functions to perform the operation. My vector is defined as

If I want to add two vectors together and return a vector, is there a general best practice for one of these forms?Code:struct Vector { double x; double y; double z; };

Assume the latter function accounts for the case thatCode:Vector * vector_add_1(Vector *v1, Vector *v2) { Vector *sum = malloc(sizeof(Vector)); /* Assign values to sum */ return sum; } void vector_add_2(Vector *v1, Vector *v2, Vector *dest) { dest->x = ...; /* Snip */ return; }destcould bev1and/orv2.