What is the result of the following program? char* f(char *str, char ch) {
char *it1 = str;
char *it2 = str;
while (*it2 != '\0') {
while (*it2 == ch) { it2++; }
*it1++ = *it2++;
}
return str;
}
void main(int argc, char *argv[]) {
char *a = new char[10];
strcpy(a, "abcdcccd");
cout << f(a, 'c');
}
https://gw-c.nowcoder.com/api/sparta/jump/link?link=https%3A%2F%2Fwww.nowcoder.com%2FquestionTerminal%2F4e8ebc4cacb6443bae504537692a0195