I'm trying to do Merg sort recursively. But the problem is, i am unable to find out the base case when i split an integer array in to sub arrays. Below is my that i have written for Merg sort.

Code:
void Merg(int A[], int s1, int e1, int s2, int e2) {  	int B[8]; 	int i=0;  	while (A[s1] < A[s2]) 			 		B[i] = B[s1]; 		i++; 		s1++;  		if (s1 == e1) 		{ 			B[i] = A[s2]; 			i++; 			s2++; 		} 			 	while (A[s2] < A[s1]) 		 		 		B[i] = B[s2]; 		i++; 		s2++;  		if (s2 == e2) 		{ 			B[i] = A[s1]; 			i++; 			s1++; 				 		} }    void Split(int A[], int s, int e) { 	int mid = (s+e)/2;  	if (s < e && mid != 0) 	{	 		Split(A, s, mid); 		Split(A, mid+1, e);	 	} 	Merg(A, s, mid, mid+1, e); }     int main() { 	int A[8] = {10,4,8,12,11,2,7,5}; 	 	Split(A, 0, 7);   	return 0; }