Inside merge() the assignment of i,j,k
i = 0; j = middle; k = 0;
while (i!=n1 || j!=n2) { ...
should be changed to this
i = 0; j = 0; k = p;
while (i!=n1 && j!=n2) {...
1
solved Segmentation fault in merge sort program
Inside merge() the assignment of i,j,k
i = 0; j = middle; k = 0;
while (i!=n1 || j!=n2) { ...
should be changed to this
i = 0; j = 0; k = p;
while (i!=n1 && j!=n2) {...
1
solved Segmentation fault in merge sort program