![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/7e3e6709c93d70cf95409994f3dcd100bba12bf4?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
#include<stdio.h>
int main()
{char s[]="***AB***CDE**12F***",*p,*p1,*q;
for(p=s;*p=='*';p++); //p指向A
for(;*p!='*';p++); //p指向B后的*
for(q=p;*q;q++); //q指向串尾
for(q--;*q=='*';q--); //q指向F
for(p1=p;p<=q;p++) //复制中间非*字符
if(*p!='*')*p1++=*p;
for(;*p1++=*q++;); //复制尾部*直到串尾符
puts(s);
return 0;
}