Dude lots of things wrong with that code.I'm posting the updated code this works.I have added comments so you figure it out.
Code:
#include<stdio.h>
void squeez(char *,char *,int );
int main()
{
char s[] = "some text l";
char z[] = "some text here";
int l=sizeof(s);
squeez(s,z,l); //call to function
return(0);
}
void squeez(char *s,char *z,int l)
{
char *k=z;
int dummy = 0;
int j=0;
char x[l];
while(*s !='\0') /* the starting loop */
{
dummy=0;
k=z;
while(*k != '\0') /* inner loop */
{
/* the purpose of dummy is to tell weather this if statement became true or not */
if(*s==*k)
{
dummy = 1;
} //end of if
k++; //increment pointer
} //exit inner loop
if(dummy ==0)
{
x[j] = *s;
j++;
}
s++;
} //exit outer loop
puts(x); /* printing out the values */
} //exit