0
Write a program that accepts two strings from the user and prints the combination and the concatenation thereof.
A sample run: Enter a string: Good Enter another string: day The combination is dGoodaGoody The concatenation is Goodday
3 Answers
0
a=input()
b=input()
print("Conact: "+a+b)
0
You can use strcat function function of string.h header file to concatenate two strings.
The strcat() function concatenates a source string to destination string and adds a null character at the end of destination.
strcat(destination, source);
Here is the sample C program to concatenate two string
http://www.techcrashcourse.com/2014/10/c-program-concatenate-strings.html
http://www.techcrashcourse.com/2015/08/string-h-c-standard-library-functions.html