Question: Write a program in c that uses a pointer-based linked list to manage a spell checker/translator. YOU CANNOT USE ANY STATIC ARRAYS AND THE FILE
Write a program in c that uses a pointer-based linked list to manage a spell checker/translator. YOU CANNOT USE ANY STATIC ARRAYS AND THE FILE MUST BE READ IN AS IS! 1. Your program must read in each line of the input file (hw10data.txt) and put each word into a separate link of a pointer based linked list. For each word, you need to create a link that can hold that word precisely (i.e. the payload section must be sized specifically for each word). In other words, your structure for the linked list *CANNOT* look like this: struct node { char word[n]; struct node *next; } It *MUST* look like this: struct node { char *word; struct node *next; } The difference is that in the required form, there is no space allocated for the text. You will have to use malloc/calloc to allocate that space. ----------
hw10data.txt
Eye have a spelling chequer, It came with my Pea Sea. It plane lee marks four my revue, Miss Steaks I can knot sea. Eye strike the quays and type a whirred, And weight four it two say, Weather eye am write oar wrong, It tells me straight aweigh. Eye ran this poem threw it, Your shore real glad two no. Its vary polished in its weigh. My chequer tolled me sew. A chequer is a bless thing, It freeze yew lodes of thyme. It helps me right all stiles of righting, And aides me when eye rime. Each frays come posed up on my screen, Eye trussed too bee a joule. The chequer pours over every word, Two cheque sum spelling rule
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
