#include
#include
using namespace std;
#define T_SIZE 1001
char* string_merge(char *, char *);
int main()
{
int t,n;
char S1[T_SIZE], S2[T_SIZE], S;
cin >> t; / wczytaj liczbę testów */
cin.getline(S1,T_SIZE);
while(t)
{
cin.getline(S1,T_SIZE,’ ');
cin.getline(S2,T_SIZE);
S=string_merge(S1,S2);
cout << S << endl;
delete[] S;
t–;
}
return 0;
}
char* string_merge(char *a, char *b )
{
int temp=0;
int x=0;
if (strlen(a)<strlen(b))
{
temp=strlen(a);
}
else
{
temp=strlen(b);
}
char *n=new char[temp];
for(int z=0; z<temp; z++)
{
memmove (n+x,a+z,1);
memmove (n+1+x,b+z,1);
x=x+2;
}
return n;
}