Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Progress Monitoring Data Tracking Organizer

Authors: Teacher'S Aid Publications

1st Edition

B0B7QCNRJ1

More Books

Students also viewed these Databases questions