Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <iostream>
- char *twostrings(char *s1, char *s2) {
- char *result;
- result = s1;
- while (*s1 != '\0')
- s1++;
- while (*s2 != '\0')
- {
- *s1 = *s2;
- s1++;
- s2++;
- }
- *s1 = 0;
- return result;
- }
- void main()
- {
- char s1[100];
- char s2[100];
- gets_s(s1);
- gets_s(s2);
- printf("%s", twostrings(s1,s2));
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement