Description
Create a program that reads multiple lines of text and generates a table displaying the count of one-letter words, two-letter words, three-letter words, and so on, with the assumption that the words consist solely of English letters and have a maximum length of 10 characters.
Sample Run:
./HW6
Enter your string: Whether ’tis nobler in the mind to suffer
| Word Length | Occurrence |
|—|—|
| 1 | 0 |
| 2 | 2 |
| 3 | 1 |
| 4 | 2 |
| 5 | 0 |
| 6 | 2 |
| 7 | 1 |
| 8 | 0 |
| 9 | 0 |
| 10 | 0 |
Requirements:
1. You must use pointer /offset notation in this assignment instead of array notation. For instance, if you have an array named a, to access its content under subscript 5, you must write: *(a + 5) instead of a[5]. Please note that points will be deducted if this requirement is not followed.
2. Your program must compile and run without errors using the gcc compiler on the thor server.