#include <stdio.h>

void squeeze(char s[], int c);

/* test squeeze */
int
main()
{
    char s[] = "Hello, world\n";

    squeeze(s, 'l');
    printf("%s", s);
    return 0;
}

/* squeeze: delete all c from s */
void
squeeze(char s[], int c)
{
    int i, j;

    for (i = j = 0; s[i] != '\0'; i++)
        if (s[i] != c)
            s[j++] = s[i];      /* note at j++ as subscript of the array */
    s[j] = '\0';
}
