CSDN论坛里的一道题,mstlq给出的答案: #include<stdio.h> int main() { char str[] = "ab**cd**fef**gh12"; char *p1 = str, *p2 = str; while (*p1++ != '/0'); for (p2 = --p1; p1 >= str; --p1) { if (*p1 != '*') *p2-- = *p1; } for (; p2 >= str; *p2-- = '*'); puts(str); return 0; }