Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please solve the following question in C++ with complete logic The String library in C++ contains many useful functions for string manipulation, such as copy,
Please solve the following question in C++ with complete logic
The String library in C++ contains many useful functions for string manipulation, such as copy, concatenate or compare two strings. Your task is to use char pointers to implement from scratch the following functions of the string library: int toupper (char* ch); Return the uppercase of ch int tolower (char* ch); Return the lowercase of ch int isspace (const char* ch); Return 1 if ch is a white space (blank ' ', carriage return ' ', newline ' ', tab ' \t ', form feed ' \f ', vertical tab ' \v) and 0 otherwise char * strncpy (char * dest, const char * src, size_t n) Copy at most n characters from src into dest, return dest int strcmp (const char * cstr1, const char * cstr2) Compare cstr1 and cstr2. Return 0 if cstr1 is equal to cstr1, less than zero (usually -1) if cstr1 is less than cstr2, more than zero (usually 1 ) if cstr1 is more than cstr2. char * strncat (char * dest, const char * src, size_t n) Append at most n characters from src into dest, return src. char * strstr( char cstr1, char * cstr2); Return a pointer to the first occurrence of cstr 2 in cstr1 char * strtok (char * cstr, const char * delim) Tokenize cstr with delim as the delimiters Object Oriented Programming (CY) Spring 2023 Note that all array manipulation must be done through pointer notation. Use of the subscript operator for indexing is not allowed. All arrays must be dynamicStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started