#include
void main()
{
void con(char sting1[],char sting2[],char sting3[]);
char s1[20],s2[20],s3[40];
printf("Input sting1: ");
scanf("%s",s1);
printf("Input sting2: ");
scanf("%s",s2);
con(s1,s2,s3);
printf("%s\n",s3);
}
void con(char sting1[],char sting2[],char sting3[])
int i,j;
for(i=0;sting1[i]!="\0";i++)//////////////////////////多個分號
sting3[i]=sting1[i];
for(j=0;sting2[j]!="\0";j++)//////////////////////////多個分號
sting3[i+j]=sting2[j];
sting3[i+j]="\0";
#include
void main()
{
void con(char sting1[],char sting2[],char sting3[]);
char s1[20],s2[20],s3[40];
printf("Input sting1: ");
scanf("%s",s1);
printf("Input sting2: ");
scanf("%s",s2);
con(s1,s2,s3);
printf("%s\n",s3);
}
void con(char sting1[],char sting2[],char sting3[])
{
int i,j;
for(i=0;sting1[i]!="\0";i++)//////////////////////////多個分號
sting3[i]=sting1[i];
for(j=0;sting2[j]!="\0";j++)//////////////////////////多個分號
sting3[i+j]=sting2[j];
sting3[i+j]="\0";
}