Question: hello, i need help filling in the string functions below i did couple please if i made a mistake to fix them i dont know

hello, i need help filling in the string functions below

i did couple please if i made a mistake to fix them

i dont know hat to do for the others. please helphello, i need help filling in the string functions below i didcouple please if i made a mistake to fix them i dont

know hat to do for the others. please help LAB: C++/C common

LAB: C++/C common string functions part 2: reverse_, reverse_new, strchr_, strrchr, strncat, strstr replace, replace str Code and Algorithm Design This lab, based on K and R (aka: THE C PROGRAMMING LANGUAGE by Kernighan and Ritchie), is designed to give more practice in working with common C library functions used in C++/C (please refer to Chapter 5.5 when needed, or related sections (marked in the text). . char*reverse (char" q): .char* reverse_new_(const char* q): // reverse a string in place // make a new string that is reversed // find the first occurrence of c char* strchr_(char* s, char c); . char* strrchr(char* s, char c); find the last occurrence of c // concatenate up to n characters from t onto the end of s .char strncat_(char* s, const char* t, size t n): .char strstr_(char s, const char* t) / find the first occurrence of string t in s .char replace_(char s, char c, char d) / replace all occurrences of c with d . I replace all occurrences of substring t with new substring u char* replace_str_(char s, char* t, char u): All of these functions should be implemented with pointers. Students will also show each of the algorithms using spreadsheets (as in the previous lab). Don't forget to check: http://www.cplusplus.com and http:/len.cppreference.com when needed. strlen(const char s) en #include #include #include 3 p ro g r a mo st+ Il Reverse string q in place char reverse_(char* q) // fill in code here ll Make a new string that is the reverse of string q - don't forget to deletel it in main char reverse_new_(charq) ( /I fill in code here l Find the first occurrence of c in s strchr(char* char* s. char c) ; / fill in code here Find the last occurrence of c ins / fill in code here char strrchr (char* s, char c) ( Il Concatenate up to n characters of t ontos char" strncat-(char, s, const char. t, size-t n) { // this will help you on replace-str- ill in code here Il Find the first occurrence of string t in s fill in code here ll Replace all occurrences of c with d fill in code here Il Replace all occurrences of string t with string u char strstr_(char s, const char* t) t char* replace-(char* s, char c, char d) { Hint: make a temporary buffer that is the same as s McCarthy page 1 of 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!