Question: Write a function called concat() which takes two strings as input, s1 and s2 and returns a new string in which the second string is concatenated (added to) on to the end of the first string. In other words the new string consists of all the characters of s1 up to but not including the null character followed by all the characters in str2 including the final null character. For example, if s1 is "agree" and s2 is "able", the new string would contain "agreeable". Write a main program which tests your function. The program output should look like: The concatenation of the string: "agree" and the string: "able" is the string: "agreeable" which is 9 characters in length. Copy and paste your program into the box below.
Question: Write a function called concat() which takes two strings as input, s1 and s2 and returns a new string in which the second string is concatenated (added to) on to the end of the first string. In other words the new string consists of all the characters of s1 up to but not including the null character followed by all the characters in str2 including the final null character. For example, if s1 is "agree" and s2 is "able", the new string would contain "agreeable". Write a main program which tests your function. The program output should look like: The concatenation of the string: "agree" and the string: "able" is the string: "agreeable" which is 9 characters in length. Copy and paste your program into the box below.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter9: Completing The Basics
Section9.4: Character Manipulation Functions
Problem 6E
Related questions
Question
in C
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr