Question: Project 4 Your C code Write a program that will solve a word search where each word may be appear multiple times in the puzzle.

Project 4

Your C code

Write a program that will solve a word search where each word may be appear multiple times in the puzzle. The code will output to the display and a file where in the grid all of the words were started, and which direction the word progressed, N,NE,E,SE,S,SW,W,NW

The data will be stored in a file that consists of

number_of_rows number_of_columns

a grid of number_of_rows by number_of_columns characters.

the list of words being searched for

The data grid needs to be read into a dynamic array (space is malloced) and accessed via pointers

The list of words being searched for should be stored in a linked list, where each node of the list uses this struct:

struct node { char *word; // a pointer to a dynamic array that holds the word (a dynamic C-string) int length; // an int that holds how many characters are in word struct list *first; // a pointer to a struct that will hold the index of where the word occurred and in which direction struct node *nextword; // a pointer to a struct node that will hold the next word being searched for }; struct list { int row; int col; int orientation; struct list *next; // a pointer to a node of type list that will be the next location of word in puzzle }; 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!