Getting warning: command terminated with signal 15

 #include<bits/stdc++.h>

using namespace std;

long long bit[26][100000];

void update(long long i,long long n,long long v,char ch){

while(i<n){
int index=int(ch-'a');
 bit[index][i]+=v;
 i+=(i&(-i));
}

}
long long query(long long i,int ch){

long long ans=0;
while(i>=0){
 ans+=bit[ch][i];
 i-=(i&(-i));
}
return ans;

}

int main() {

    int q,n;
    cin>>n;
    cin>>q;
    memset(bit,0,sizeof(bit)); 
    char a[100000];
    cin>>a;
    for(int i=0;i<n;i++){
    update(i,n,1,a[i]);
    
    }

    while(q--){
      int qt,l,r;
      char ch;
      cin>>qt;
     int count=0;
      long long ans=0;

      if(qt==2){

          cin>>l>>r;
      
          int f=0;
          for(int i=0;i<26;i++){

            ans=query(r-1,i)-query(l-2,i);
            
            if(ans&1==1){
                count++;
            }
            if(count>1){
                cout<<"no"<<endl;
                f=1;
                break;
                }

          }

          if(f==0)
          cout<<"yes"<<endl;
      }
      else{
          cin>>l>>ch;

          update(l-1,n,-1,a[l-1]);
          update(l-1,n,1,ch);
      }

  
      }

return 0;

}

Hello @sonal_kumar,

This warning may occur due to many reasons like when the return statement is wrong or missing or using inbuilt function in an inappropriate way.

So, please cross verify your code with mine:

Hope, this would help.