Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

In C programming please Problem 2 (40 points): Word Search We will implement a word search game for this problem. The DataFile.txt contains a word

In C programming please image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Problem 2 (40 points): Word Search We will implement a word search game for this problem. The DataFile.txt contains a word file search puzzle that is size 201 x 100 (201 lines and each line has 100 characters)-all characters are uppercase This puzzle is made simple in that all words are hidden horizontally, and in forward order (i.e. no words are written backwards, nor vertically nor diagonally). Although the words are all hidden in forward order, they may occur multiple times on any given line (see sample code execution) Since there are no lowercase characters in the puzzle, you should not worry about converting lowercase to uppercase or vice versa. A sample portion of the puzzle is TPAABBINPUMADSSY ETPL which is difficult enough to search as it is. The words that are hidden in the puzzle are: P FPRINTF, FsCANF, DOUBLE, MAIN, DOWHILE, FGETS, INT, IF, WHILE, ENGINEERING, RETURN, CHAR, FCLOSE, ELECTRICAL, ECE, VOID, FLOAT, FOR write a C program that will search the text file for the word entered by a user. Your program should a) read from the text file one line at a time (Hint: use fgets) b) print to the screen bl) the word that is currently being searched. b2) number of times the word was found on the line b3) the line number and the line where the word was found. c) b4) how many times in total the word was found in the puzzle or the word is not found be interactive such that it asks a user whether he she wants to search the puzzle with a new word See sample code execution. a

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_2

Step: 3

blur-text-image_3

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students explore these related Databases questions