Q. 1: Implement the following function:surround(char * str, char c)The first argument is a pointer to a string, whereas the second argument is acharacter. When the function returns, the string pointed to by str should besurrounded by the character in variable c. For instance, if str points to “this”,and c is ‘X’, then after the function returns, str should point to “XthisX”.

Q. 1: Implement the following function:
surround(char * str, char c)
The first argument is a pointer to a string, whereas the second argument is a
character. When the function returns, the string pointed to by str should be
surrounded by the character in variable c. For instance, if str points to “this”,
and c is ‘X’, then after the function returns, str should point to “XthisX”.

order now

Are you overwhelmed by your class schedule and need help completing this assignment? You deserve the best professional and plagiarism-free writing services. Allow us to take the weight off your shoulders by clicking this button.

Get help