Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C language (thanks!!) For this project, we are going to take you back to your grade school days. Specifically, you will write a simple word

image text in transcribed C language (thanks!!)

For this project, we are going to take you back to your grade school days. Specifically, you will write a simple word search game, similar to those puzzles that you were given in second or third grade right before a holiday. With those puzzles, you were given a square matrix of letters and you had to find words Eke turkey and pilgrim and mayflower before Thanksgiving, and words like santa and snow and elfbefore Christmas. This project takes an integer size and a filename as its two command-line arguments. The size represents the number of tows and columns in a square matrix of characters. The filename specified contains the actual square matrix of these characters. As a quick example, consider the file datal that is shown at the right (a 5x5 puzzle: a c o tac e For the puzzle above, you would specify 5 and datal as your two command-line arguments, as in ./a.out 5 datal With this example, a sample execution of the program is shown below (the user is searching for the word cat). The word puzzle is: ccati dogac otace gotac ecata Enter a word to find in the puzzle : cat Tbe word cat was found 6 times, as shown below 2 times written left-to-right 1 times written top-to-bottom 1 times written bottom-to-top 2 times written right-to-left tac ..tac cat Enter another word to find (or 'zzz' to exit) : zzz A couple of comments regarding how the game should be structured: The input matrix will be lowercase letters, as will the words that the user enters to find .Words can be written left-to-right (normal English), right-to-left (backwards), top-to-bottom (each letter below the previous letter), and bottom-to-top (each letter above the previous letter). We have configured this project and its grading so that you can approach it in pieces. Start by getting the program to read (and print) the data file. Then tackle finding words that are written left-to-right. Once you have left-to-right implemented pick another direction and implement that. Continue until you have written all four directions. .Create a directory project5 on your machine. In that directory, create a file named words.c In words.c, write the code needed to implement this program Make sure that you include a header block of comments with your name and a brief overview of the program. .You must use a two-dimensional dynamic array for this project, as different data sets have different sizes . Yo must use at least three functions in this program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions