#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void unisci2stringhe ( char * stringa1 , char * stringa2 , char * stringaUnita);
int main()
{
char stringa1[128];
char stringa2[128];
char stringaUnita[256]; printf("Immettere la prima stringa\n");
scanf("%s",stringa1);
printf("Immettere la seconda stringa\n");
scanf("%s",stringa2);
unisci2stringhe ( stringa1 , stringa2 , stringaUnita );
printf(" %s + %s = %s ",stringa1, stringa2, stringaUnita );
fflush(stdin);
getchar();
exit(0);
}void unisci2stringhe ( char * stringa1 , char * stringa2 , char * stringaUnita)
{
int i , lung1, lung2; lung1 = strlen(stringa1); for ( i=0 ; i < lung1 ; i++ )
{
stringaUnita[i] = stringa1[i]; }
lung2 = strlen(stringa2); for ( i=lung1 ; i < lung2+lung1 ; i++ )
{
stringaUnita[i] = stringa2[i - lung1]; }
stringaUnita[i] = '\0';}