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
icon
Related questions
Question

in C program please

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.
Transcribed Image Text: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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Function Arguments
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr