Code:
void squeeze2(char s1[], char s2[])
{
int i, j, k;
int instr2 = 0;
for(i = j = 0; s1[i] != '\0'; i++)
{
instr2 = 0;
for(k = 0; s2[k] != '\0' && !instr2; k++)
{
if(s2[k] == s1[i])
{
instr2 = 1;
}
}
if(!instr2)
{
s1[j++] = s1[i];
}
}
s1[j] = '\0';
}
I got this from a web site with all the answers if you want it I can give it to you but i don't want to temp you by having it here if you want to figure it all out yourself
[EDIT]your code does replace the correct characters with Z's my output
Code:
Enter 2 arrays
cboard
cprogramming
ZbZZZd