Question: C++ LANGUAGE Using only pointer notation, implement and test the following functions that operate on C Strings: char *strStr(const char *s1, const char *s2) -
C++ LANGUAGE
Using only pointer notation, implement and test the following functions that operate on C Strings:
char *strStr(const char *s1, const char *s2)
- Locates the string s2 as a substring of s1 and returns a pointer to its first occurrence in s1 or nullptr if s2 is not a substring of s1
char *strrChr(constant char *s, int ch)
- Returns a pointer to the last occurrence of the character ch in string s or nullptr if ch is not in s
longAtoL(const char *s)
- Converts string s into an integer, stops after the first non digit is found: e.g. for string "123.45" number 123 is returned
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
