Exercise 2-4. Write an alternative version of squeeze(s1,s2) that deletes each character in s1 that matches any character in the string s2.
/* Exercise 2-4. Write an alternative version of squeeze(s1,s2) that deletes each character in s1 that matches any character in the string s2. */#include<stdio.h>#define LIMIT 100 /* string length limit */voidget_string(charstr[],intmax);voidsqueeze(chars1[],chars2[]);intmain(){charstr1[LIMIT];charstr2[LIMIT];printf("Enter string 1 and press enter = ");get_string(str1,LIMIT);printf("Enter string 2 and press enter = ");get_string(str2,LIMIT);squeeze(str1,str2);printf("Squeezed string 1 = %s\n",str1);return0;}/* squeeze: delete each character in s1 that matches any character in the string s2 */voidsqueeze(chars1[],chars2[]){inti,j,k;for(k=0;s2[k]!='\0';k++){for(i=j=0;s1[i]!='\0';i++){if(s1[i]!=s2[k])s1[j++]=s1[i];}s1[j]='\0';}}/* get_string: read a string into str */voidget_string(charstr[],intmax){inti,c;for(i=0;i<max-1&&(c=getchar())!=EOF&&c!='\n';i++)str[i]=c;str[i]='\0';}