Code:
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
void squeez(char s[],char z[]);
int main()
{
char s[100] = "Hey wassup !!!!!!";
char z[100] = "";
squeez(s,z);
system("pause");
return(0);
}
void squeez(char s[] , char z[])
{
int j,dummy = 0,i=0;
char x[100];
for(j = 0 ; s[j] != '\0';j++)/* the starting loop */
{
while(z[i] != '\0') /* inner loop */
{
/* the purpose of dummy is to tell weather this if statement became true or not */
if(s[j] = z[i])
{
dummy = 123;
break;
}
else
{
continue;
}
i++;
}
if(dummy != 123)
{
x[j] = s[j];
}
}
printf("%s",x);
printf("%s","azul tous imazighen"); /* printing out the values */
}