Given a string, print another one without a given char
Passing strings and buffers in C is a pain.  For this problem, it would be idiomatic to write a function that accepts an in-out parameter — basically a mutable string.  It works well in this case because you know that the result will never be longer than the original string.

char *deleteChars(char *s, char c) {
    char *out = s;
    for (char *in = s; *in; in++) {
        if (*in != c) {
            *out++ = *in;
        }
    }
    *out = '\0';
    return s;
}


If the caller wants to obtain the result as a separate string, then let the caller duplicate the string before calling deleteChars().