房天下 > 房天下问答 > 业主生活 > 其他
  • C语言 用strcpy()函数……(103)

    C语言 用strcpy()函数交换两个数组中的字符串!

    提问者:黑客阿飞

    发布于2011-01-18

共1个回答
  • gjh628 丨Lv 0
    #include <stdio.h>void main(){char s1[81],s2[81],s3[81]; printf("please input first string:\n"); gets(s1); printf("please input second string:\n"); gets(s2); strcpy(s3,s1); strcpy(s1,s2); strcpy(s2,s3); printf("\n"); printf("the first string is:"); puts(s1); printf("the second string is:"); puts(s2);}
    +1 2011-01-18 举报
热门人气推荐
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。