Code:

#define kerem 982721*11
int main(){
char isl[61],cossm[61],sinn[51];
double isl2[61]={0.0},isl3[51]={0.0},output[51]={0},input[51]={-kerem},coss2[61]={0.0},postfix[51]={0},flo=0.0,cosislem[51]={1};
int i=0,bas=0,i2=0,var=0,i3=0,girdi=0,nokta=0,baskon=0,noktakontrol[50]={0},nk=0,girdinok=0,n=0,k=0,eksikontrol[50];
int sayi=0,ek=0,eksivar=0,n1=0,i1=0,ce=0;
printf("Bir matematik islemi giriniz: ");
gets_s(isl);
for(i=0;i<50;i++)
{noktakontrol[i]=1;eksikontrol[i]=1;cosislem[i]=1;}
for(i=0;i<50;i++)
{output[i]=kerem;}
for(i=0;i<51;i++)
{cossm[i]=NULL;sinn[i]=NULL;}
for(i=0;i<60;i++)
{
if(isl[i]==NULL)break;
elseif(isdigit(isl[i])){sayi=1;}
elseif(!isdigit(isl[i]) && isl[i]!='c' && isl[i]!='o' && isl[i]!='s' && isl[i]!='['){if(sayi==1){ce++;sayi=0;}}
elseif(isl[i]=='c' && isl[i+3]=='['){n=i+4;k=0;while(isl[n]!=']'){cossm[k]=isl[n];k++;n++;};cossm[k]='=';isl[i]='1';cosislem[ce]=cos(cosinus(cossm));ce++;i=n+1;for(i=0;i<51;i++)
{cossm[i]=NULL;}}
}
for(i=0;i<60;i++)
{
if(isl[i]=='c'){n=i;for(n;n<60;n++){isl[n]=isl[n+1];}}
}
for(i=0;i<60;i++)
{
if(isl[i]=='o'){n=i;for(n;n<60;n++){isl[n]=isl[n+1];}}
}
for(i=0;i<60;i++)
{
if(isl[i]=='s'){n=i;for(n;n<60;n++){isl[n]=isl[n+1];}}
}
for(i=0;i<60;i++)
{
if(isl[i]=='['){isl[i]='.';i++;while(isl[i]!=']'){isl[i]='0';i++;}}
}
for(i=0;i<60;i++)
{
if(isl[i]==']'){n=i;for(n;n<60;n++){isl[n]=isl[n+1];}}
}

Here is the piece of code that my cause that problem. The others work fine, functions do as well, so I did not write them here.