wrong answer on large dataset(Merge Sort)

What is the problem in this merge sort program works fine on smaller dataset but gives the wrong answer on the larger set? Following is the link to the program:

A very silly mistake here. Actually, I took the maximum value as 9999 while this is much smaller for a large dataset. changed it to satisfy the constraints.