Question: 6 . 9 Lab Exercise Ch . 6 a: Functions: String analyzer Create and debug this program in Visual C + + . Upload your
Lab Exercise Cha: Functions: String analyzer
Create and debug this program in Visual C Upload your Source.cpp file for testing.
Prompt the user to enter a string of their choosing. Output the string.
Ex:
Enter a sentence or phrase:
The only thing we have to fear is fear itself.
You entered: The only thing we have to fear is fear itself.
Write a function: int CountWhitespacestring s returns the number of whitespace characters spaces and tabs in string s This function should NOT print anything.
Note: A tab is t
In main call the CountWhitespace function and then output the returned result.
Implement a function:
void OutputWithoutWhitespacestring sprints the string's characters, all on one line, except for whitespace spaces tabs
Also call OutputWithoutWhitespace to print the string without whitespace.
Sample program run:
Enter a sentence or phrase:
The only thing we have to fear is fear itself.
You entered: The only thing we have to fear is fear itself.
Whitespace count:
String with no whitespace: Theonlythingwehavetofearisfearitself.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
