#include <stdio.h>
#include <string.h>
int main() {
    char A[400];
    char B[200];
    char C[200];
    gets(A);
    gets(B);
    gets(C);
    int na=strlen(A);
    int nb=strlen(B);
    int nc=strlen(C);
    char res[500]={0};
   
    int h=0;
    for(int i=0;i<na;i++){
        if(strncmp(A+i,B,nb)==0){
            strcat(res,C);
            i=i+nb-1;
            h=h+nc;
        }
        else{
            res[h++]=A[i];
        }
        
    }
    res[h]='\0';
    printf("%s",res);
    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: