m0_59322474 2021-06-25 08:10 采纳率: 50%
浏览 49

程序有错误,我没找全,大家看一下

#include<stdio.h>#include<string.h>void fun(char *p,char *q,char *c){int k=1;while(*p!=*q){if(p<q) c[k]=*q;else c[k]=*p;p++;q++;k++; }}main(){char a[10]="aBCDeFgH", b[10]="ABcd", c[80]={'\0'};fun(a,b,c);printf("the string a:"); puts(a);printf("the string b:"); puts(b);printf("the result c:"); puts(c);}

  • 写回答

1条回答 默认 最新

  • threenewbee 2025-03-17 23:54
    关注

    程序要干吗不说,而且代码都写在了一行。

    评论

报告相同问题?