Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 1 - String Operations - 4 0 pointsDr. Bizzarus is on a mission. He is approaching people on the street and asking them to
Problem String Operations pointsDr. Bizzarus is on a mission. He is approaching people on the street and asking them to write a sentenceof their choice on a notepad. He is then going to generate statistics on the string. He wants to know theway they volunteers space out their strings, the number of hexadecimal numeral characters, and thenumber of matched upper and lowercase characters found in the string. However, he is completely out of
his depth with string processing and has just hired you to write a C program for him.This program has to use C string objects, and not Cstrings.Specifications Call this program stringops.cpp Write a function called spaceCount that takes in a string as a parameter and returns the number ofwhitespace characters in the string. points Write a function called digitCount that takes in a string as a parameter and returns the number ofhexadecimal numeral characters in the string. points Write a function called caseMatchCount that takes in a string as a parameter and returns thenumber of matched lower and uppercase characters in the string. Each matched character pair mustbe counted only once. That is if you have a string HELLO World you will have matchedcharacters l and o The ls should not be counted twice. You will be allowed the use of parallelarrays for this. points In the main function, accept a # terminated string from the user. Then, print all the statisticsof the string. Repeat until the user enters Done points Please comment your code appropriately. points You are restricted to the iostream, cctype and string libraries for this program. You are not allowed to use the string class iterators like begin, end, rbegin, rend, etc. The text entered may contain stray whitespace.Sample RunRegular text is whats printed by your program. Underlined text is user input, shown here as a sample.You will not be printing the underlined parts in your program.Enter the string: Maybe a story will cheer you upOnce upon a time there was an UglyBarnacle. He was so ugly, that everyone died.the end.#Number of whitespace charcaters: Number of hexadecimal digits: Number of matched characters: Enter the string: Who are you people?!!#Number of whitespace characters: Number of hexadecimal digits: Number of matched characters: Enter the string: Done#
Step 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