#include <iostream>
using namespace std;
void main()
{
char a[80], b[20];
int i, j;
cout << "输入数组a的元素";
cin >> a[80];
cout << "输入数组b的元素";
cin >> b[20];
i = 0;
while (a[i] != '\0')
i++;
j = 0;
while (b[j] != '\0 '&& j < 5)
{
a[i + j] = b[j];
j++;
}
a[i + j] = '\0';
cout << a << endl;
getchar();
getchar();
}
using namespace std;
void main()
{
char a[80], b[20];
int i, j;
cout << "输入数组a的元素";
cin >> a[80];
cout << "输入数组b的元素";
cin >> b[20];
i = 0;
while (a[i] != '\0')
i++;
j = 0;
while (b[j] != '\0 '&& j < 5)
{
a[i + j] = b[j];
j++;
}
a[i + j] = '\0';
cout << a << endl;
getchar();
getchar();
}