I need help filling in the codes for this program. C++
LAB: C++/C common string functions part 2: reverse, reverse new strchr strrchr, strncat strstrreplace, replace str Code and Algorithm Design This lab, based on K and R (aka: THE C PROGRAMMING LANGUAGE by Kemighan 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) / make a new string that is reversed char strchr_(chars, char c): char strrchr (char s, char c): /I reverse a string in place / find the first occurrence of c find the last occurrence of c .II concatenate up to n characters from t onto the end ofs char strncat (char* s. const char* t. size t n): char replace (char s. char c, char d); I replace all occurrences of c with d char replace str_(char s. char t.char u): .1 replace alt occurrences of substring t with new substring u All of these functions should be imalemented with pointers. Students will also show each of the algorithms using spreadsheets (as in the previous lab). Don't forget to check: when needed. nclude
#include W Reverse string q in place fill in code here l Make a new string that is the reverse of string q-don't forget to deleteD it in main ti11 in code here N Find the first occurrence of c in s fill in code here W Find the last occurrence of c in s char reverse_(char* q) char reverse_new_(char q) char strchr_(char' s. char c): char strrchr_(char s. char c) t rill in code here Il Concatenate up to n characters of t onto s char strncat (char s, const char t. size tn) ( I/ this will help you on replace str till in code here Find the first occurrence of string t in s fill in code here l Replace all occurrences of c with d fill in code here l Replace all occurrences of string t with string u char strstr(char s, const char* t) char replace (char s. char c, char d) ( / Hint: make a temporary buffer that is the same as s page 1 of 2