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

17th Mar 2017, 11:15 AM
Lerato
3 odpowiedzi
0
a=input() b=input() print("Conact: "+a+b)
17th Mar 2017, 11:59 AM
Leshark
Leshark - avatar
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
15th Apr 2017, 6:14 AM
Arun Kumar
Arun Kumar - avatar