Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm stuck on working through the following char *mystrrchr(const char *pc, int iChar); All others I don't need help with its only this last one

image text in transcribed

image text in transcribed

I'm stuck on working through the following "char *mystrrchr(const char *pc, int iChar);" All others I don't need help with its only this last one which I previously stated in quotes, thank you.

Note: Function strcat() also returns the destination string, but that return value is often ignored. (s) The strrchr() function returns a pointer to the last occurrence of character in the C string str. The terminating null-character is considered part of the C string. Therefore, it can also be located to retrieve a pointer to the end of a string. Example: / strrchr example */ char str[] = "This is a sample string"; char * pch; pch=strrchr (str,s); The pointer pch points to 's' at position 18. Assignment Directions Your task in this assignment is to complete your own versions of these five commonly used standard string functions. Each of your functions should have the same behavior as the corresponding C standard string function. For example, your mystrlen function should behave similarly to the C standard strlen function. Your functions should not call any of the standard string functions. In the context of this assignment, you should pretend that the standard string functions do not exist. call mystrlen("') returns 0. First create a header file named mystring.h containing the interface to your functions. The interface should consist of a set of function declarations. Then create a file named mystring.cpp containing the implementation of your functions, that is, a set of function definitions. It should "\#include" the interface file to ensure that each function definition is consistent with its declaration

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

Data Analytics And Quality Management Fundamental Tools

Authors: Joseph Nguyen

1st Edition

B0CNGG3Y2W, 979-8862833232

More Books

Students also viewed these Databases questions

Question

Explain the forces that influence how people handle conflict

Answered: 1 week ago