Qqun pourrait me dire où est ce ce programme de concaténation bloque. La compilation n'indique aucune erreur mais l'exécution foire
#include <stdio.h>
#include <conio.h>
#include <string.h>
/*Concatener ch1 et ch2. ch1 doit aller après ch2*/
char concatch(char *ch1,char *ch2);
void main()
{
char *textch1;
char *textch2;
char fini;
printf("Premier text: ");
scanf("%s",&textch1);
scanf("%c",&fini);
printf("Deuxieme texte: ");
scanf("%s",&textch2);
scanf("%c",&fini);
concatch(textch1,textch2);
printf("Texte final est: %s\n ",textch2);
};
void concatch(char *ch1,char *ch2)
{
int i;
int j;
i=0;
j=0;
while(*(ch2+i) !='\0')
{
i++;
}
while(*(ch1+j)!='\0')
{
*(ch2+i)= *(ch1+j);
i++;
j++;
}
*(ch2+i)='\0';
}
merci
@zz