编一程序,将两个字符串连接起来,不要用strcat函数

#include <stdio.h>
int main()
{
    char s1[80],s2[40];
    int i=0,j=0;
    printf("Please input your String1: ");
    scanf("%s",s1);
    printf("Please input your String2: ");
    scanf("%s",s2);
    while(s1[i]!='')
    i++;
    while(s2[j]!='')
    {
        s1[i]=s2[j];
        j++;
        i++;
    }
//    s1[i]='';
    printf("The new string is:%s ",s1);
    return 0;
    
    
}

原文地址:https://www.cnblogs.com/LiQingXin/p/13056792.html