Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define MAX_SIZE 100
- int main()
- {
- int text1[MAX_SIZE],text2[MAX_SIZE];
- int i,j;
- printf("Input string1:");
- gets(text1);
- printf("Input string2:");
- gets(text2);
- i=0;
- while(text1[i]!=0){
- i++;
- }
- j=0;
- while(text2[j]!=0){
- text1[i]=text2[j];
- i++;
- j++;
- }
- text1[i]='\0';
- printf("Concatenated string: %s\n",text1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment