this how the variable is passed from the main func:
Node merged = NULL;
ErrorCode result = mergeSortedLists(left, right, &merged);
and this is the signatue of the func.
ErrorCode mergeSortedLists(Node list1, Node list2, Node *merged_out);
If an error occurs in func. mergedsortedlists we should return res=Error and the merged list should be NULL
the tutor said we should assign merged_out=NULL; but isn't the address passed by value to the func.? shouldn't we assign the var it points to, to NULL i.e. *merged_out=NULL;
Thanks in advance!