字符串连接,不用库函数s'tract
#include <stdio.h>
int main()
{
int i=0,j=0;
char a[100],b[100];
scanf("%s\n",&a[100]);
scanf("%s",&b[100]);
while(a[i]!='\0')
{
i++;
}
while(a[j]!='\0')
{
a[i+j]=b[j];
j++;
}
a[i+j]='\0';
printf("%s",a[100]);
return 0;
}
18|warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=]|