Question: Character Pointers and string coding in c++ Problem 4: C String, character pointer to string Write a program that takes string as input from the
Character Pointers and string coding in c++

Problem 4: C String, character pointer to string Write a program that takes string as input from the user (the number of characters should be more than three). Assign this string to character pointer. . Print the mid two characters of the string (if length of the string is even) .Print mid three characters of the string (if length of the string is odd) string midChar(char* charPtr, int n); Examples a. midChar("Bibimbap", 8) - "im" b. midChar("Ddukbokki", 9) -> "kbo" OUTPUT ter a string: Bibimbap idCharacters are: im er a string: Ddukbokki idcharacters are: kbo
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
