Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C language please!!! Input sample files included below! Write a program that will solve a word search where each word may be appear multiple
In C language please!!! Input sample files included below!
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 t char *word; / a pointer to a dynamic array that holds the word (a dynamic C- string) int length; /I an int that holds how many characters are in word struct list *first; I/ a pointer to a struct that will hold the index of wher e 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 t int row; int col; int orientation struct list *next; I/ a pointer to a node of type list that will be the next Location of word in puzzle Example input file: TESTA ESEEB SSESC TSETD AYUDF test here are two sample input files sampleinput.txt samplefile.txt Your code should prompt for the filename, read in the data from the filename, search for the words, populate the linked lists, then print out the results from the linked lists Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started