Project: Write a Word Processor in C
You have to create a Word processor using C programming. The program can accept a sentence of not more than 20 words.
The program is also able to perform the following functions:
(i) Reverse the whole sentence and print it out.
(ii) To identify how many instances of a specified character.
(iii) To return the position a specified character at the first occurrence.
(iv) To return the position a specified character at the last occurrence.
(v) To return the number of words in the sentence.
(vi) Reverse all the words in the sentence.
- You NEED to user 1-dimensional array or text to store the sentence .
- You NEED looping statements to control the online menu.
- Other C techniques you may user are:
- if-else statement
- switch-case statement
- while/for/do-while statement
You should provide a menu for the user to choose the options.One possible sample of the menu is:
(1) Enter the sentence (max. 20 words)
(2) How many words in the sentence?
(3) Reverse the whole sentence from last character to the first.
(4) Find the number of the instances of character:
(5) Find the position of a specified character at the first occurrence.
(6) Find the position of a specified character at the last occurrence.