PLEASE ANSWER THE QUESTION IN C! 1) Instead of reading several lines of text, just hard-code the following text in the program a. myString= “The quick Brown ? Fox ? jumps over the Lazy Dog and the !##! LAZY DOG is still sleeping”. b. The program should work with any value assigned to myString. c. Use a very small set of text (like “Ab#C#d” ) to test/debug your program first. Use lots of tracing statements to help you to trace the value of array index and elements. 2) The program should use of your own function that converts the text to lower case (do not use
PLEASE ANSWER THE QUESTION IN C!
1) Instead of reading several lines of text, just hard-code the following text in the program
a. myString= “The quick Brown ? Fox ? jumps over the Lazy Dog and the !##! LAZY DOG is
still sleeping”.
b. The program should work with any value assigned to myString.
c. Use a very small set of text (like “Ab#C#d” ) to test/debug your program first. Use lots
of tracing statements to help you to trace the value of array index and elements.
2) The program should use of your own function that converts the text to lower case (do not use
the built-in tolower function ) and then perform the analysis in the main function. Ignore any
numbers, symbols or special characters, etc in the text if any.
Note : It’s easier to create a new string for the result instead of modifying the original
string.
3) Instead of the three methods outlined in the original question, complete only part a and part b.
Assume maximum word length is 10 for part b.
4) Turn in one program that contains part a and b.
Output
Original text:
The quick Brown ? Fox ? jumps over the Lazy Dog and the !##! LAZY DOG is still sleeping
Modified text:
the quick brown fox jumps over the lazy dog and the lazy dog is still sleeping
Note : Do not adjust the extra space between words where symbols were removed (like
between brown ,fox and jumps)
Letter Count
a 2
b 1
Word length Occurrences
1 0
2 1
Required:
Use two 2 dimensional arrays to emulate the tables that will capture the result of the analysis. One for
part a and another for part b.
Use loops to initialize the array values.
Indent your code/ provide comments when implementing somethings that require some logic.
Do not use 26 if statements to check for each letter. Use range of the alphabet (like between the
starting and ending ASCII value of the letters).
Create a function that will
a) At minimum receive two strings: target and source
b) Copy from source to target; consume only A-Z, a-z and space, converting all upper case
letters to lower case and ignoring everything else.
Step by step
Solved in 2 steps with 7 images