Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define MAX 100
- int main()
- {
- int i=0;
- int j=0;
- char stringa[MAX];
- char spazio[MAX]=" ";
- char stringa2[MAX];
- printf("inserisci una stringa\n");
- fflush(stdin);
- gets(stringa);
- printf("la stringa inserita e' %s\n",stringa);
- fflush(stdin);
- gets(stringa2);
- printf("la srtringa %s\n",stringa2);
- strcat(stringa,spazio);
- strcat(stringa,stringa2);
- while(stringa[i]!='\0')
- {
- i++;
- }
- printf("la srtringa %s e' lunga %d caratteri",stringa, i);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement