char* removeMiddleStar(char *str) { if (!str) return str; char *p = str; for(; *p == '*'; ++p); char *q = p; while(*++q != '