Sale!

Assignment 6 CSC250 solved

$30.00 $18.00

Original Work ?

Download Details:

  • Name: AssignmentSix-gsmyp9.zip
  • Type: zip
  • Size: 90.46 KB

Category: Tags: , You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

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.