CSC 101 Programming Assignment 4
Word Find
The program for this assignment finds words in word search puzzles. Writing the program requires that you understand the following concepts:
In this program you will implement a program which locates words in common word search puzzles (all puzzles are 10x10). A sample puzzle is shown below:
WAQHGTTWZEThe above puzzle contains the words: unix, calpoly, slo, and campus.
Words can appear in the puzzle running up, down, left-to-right, or right-to-left. You do not need to check diagonals.
Your program should take 2 files as command line arguments:
Your program will always be tested with these 2 command line arguments:
./wordsearch puzzle1 words1Sample program output is shown below:
Puzzle: WAQHGTTWEE CBMIVQQELS AZXWKWIIIL LDWLFXPIPV PONDTMVAMN OEDSOYQGOB LGQCKGMMCT YCSLOACUZM XVDMGSXCYZ UUIUNIXFNU UNIX: (LEFT) row: 9 column: 3 /* LEFT means left-to-right */ CALPOLY: (DOWN) row: 1 column: 0 GCC: word not found SLO: (LEFT) row: 7 column: 2 COMPILE: (UP) row: 6 column: 8 VIM: (RIGHT) row: 1 column: 4 TEST: word not found
Your program will be evaluated using a set of input files. Sample input and expected output files are located in the program 4 directory (on vogon, copy them from ~djanzen/www/courses/101S11/projects/proj4/files/).
You can get them with the following command: cp ~djanzen/www/courses/101S11/projects/proj4/files/* .You are expected to use good design principles as discussed in class and the book. Divide your solution into multiple functions. You are encouraged to write tests for your functions with the checkit_* functions as appropriate.
Be sure to follow the course Code Style, and don't forget to run
on your program before handing it in.indent -kr -nut wordsearch.c
NO collaboration is allowed on this assignment. Everyone must do their own individual work.
You submit one program file named wordsearch.c. Use the vogon handin command:
handin djanzen 101_prog4 wordsearch.cComplete this survey.