Sorting code doesnt work when i increase number of elements : Im trying to write strand sort algorithm. Its work when sorting 6-7 elements. But when i increase number of elements gives anything. Here is codes. And if any idea for improving tell me.

-//It looks like your post is mostly code; please add some more details.

    #include <stdio.h>

    void fonk(int *,int *,int);

    int main(){
	
	     int a[] = {6,9,8,10000,9,8,9,8},b[sizeof(a)/sizeof(int)],c;
	
	     fonk(a,b,sizeof(a)/sizeof(int));
	
	     for(int k = 0; k < sizeof(a)/sizeof(int); k++) printf("%d ",b[k]);
		
	     return 0;
    }

    void fonk(int *ip,int *op,int indissayisi){//sorting func
	
	if(indissayisi != 0){
		int sub[indissayisi];
	
		int t = 1,missindice =1,tyitutan,b=0;
		sub[t-1] = *ip;
		*ip = 0;
	
		for(int k = 1; k-1 < indissayisi; k++){//getting sub list and changing indices of rest of *ip
	
			if(sub[t-1] <= *(ip+k)){//transfer ip to sub
				sub[t] = *(ip+k);
				t++;
				*(ip+k) = 0;
				missindice++;
			}
			else{
				*(ip+k-missindice) = *(ip+k);//change indice
			}
		}
		int t2=t;
		tyitutan = indissayisi-t;
		if(*(op+indissayisi) == 0){//transfering sub to op first time
			for(int l = 0; l < t; l++,t2--){
				*(op+indissayisi-t2) = sub[l];
			}
		}
		else{
			for(int l = 0; l <  t; l++,t2--){ //transfering and sorting
				if(sub[l]<*(op+indissayisi+b)){
					*(op+indissayisi-t2) = sub[l];
				}
				else{
					*(op+indissayisi-t2) = *(op+indissayisi+b);
					b++;
					l--;
				}
			}
		}
		fonk(ip,op,tyitutan);
	}
}