int contador = 0;
p = cadena1;
int tope1, tope2;
while ( *p != '\0' ){
p++;
contador++;
}
tope1 = contador;
p = cadena2;
while ( *p != '\0' ){
p++;
contador++;
}
tope2 = contador - tope1;
char *concatenada = ( char * ) malloc ( contador * sizeof(char) );
for ( int i = 0; i < tope1; ++i )
concatenada[i] = cadena1[i];
for ( int i = 0; i < tope2; ++i )
concatenada[tope1 + i] = cadena2[i];