Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You will write a program which reads in a 2D grid of characters which represent

ID: 3567514 • Letter: Y

Question

You will write a program which reads in a 2D grid of characters which represent a word-
search similar to what you find in the newspaper Your program then prompts the user

to enter words for which to search. A word can appear in any one of eight directions:

1. west-to-east

2. east-to-west

3. north-to-south

4. south-to-north

5. NW-to-SE

6. SE-to-NW

7. SW-to-NE

8. NE-to-SW

Notice that half of these are unconventional (e.g., right to left, bottom-to-top).

Program Behavior:

The input file is specified as a single command line argument to your program.

For instance:

$ ./wsearch board.txt

If no command line argument is specified, the program simply reports the error

and terminates.

File Format:

You have been given a function read_puzzle in a file called read_puzzle.c

which will read a board from a given filename. It returns 1 on success and 0 on

failure. You should be able to treat it as a black-box for reading boards.

You can simply cut and paste the read_puzzle function into your program

(along with the next_symbol helper function. Or you can keep it in a separate

file and treat it as a library function to which your program will link (much like

simpleio). In either case, your makefile should make all of this transparent.

However, you do need to understand the file format so you can create test

inputs. (And eventually, you will want to be able to open and parse input files

yourself, so feel free to examine it -- it

Explanation / Answer

This work seriously requires atleast 10,000 points!!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote