#include <stdio.h> #include <string.h> void lianjie(char a[],char b[],char c[]) { int i,j,len1=strlen(a),len2=strlen(b); for(i=0;i<len1;i++) c[i]=a[i]; for(j=0;j<len2;j++) c[i+j]=b[j]; c[i+j]='\0'; } main() { char a[100],b[100],c[100]; gets(a); gets(b); lianjie(a,b,c); puts(c); getchar(); }
标签:函数,C语言,char,字符串,include,strlen From: https://www.cnblogs.com/xkdn/p/16744254.html