COMP133 Assign # 5 solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (6 votes)

Write a C program that reads an unspecified number of words (strings) from a file called dictionary.txt ( up to a maximum of 100 word ) and stores those words in an array called dict ( two dimensional array of characters).  Your program should then ask the user to enter any sentence and then check the words of the sentence against the words in the array dict to decide which words are known (exist in the dictionary ) and which are unknown (do not exist in the dictionary).  You can simply create an array of strings (two dim. array of chars) called known and an array called unknown and then print them.

 

 

Example of a Sample Run :

Assume the file dictionary.txt has the following words (you can put each on a separate line if you like):

are   the  hi   a  good  bad  nice  bye  this  not  very   it  hello   bye

and then we run the program:

Enter any sentence:

this is a nice sentence I like it very much

known words in your sentence are:

this   a   nice  it  very

unknown words in your sentence are:

is  sentence   I   like  much

 

VERY IMPORTANT:

  1. Turn in your assignment by replying to the course coordinator’s message on Ritaj and attaching your code file (c). You should NOT include the file dictionary.txt.

 

  1. DO NOT SEND a MESSAGE To YOUR INSTRUCTOR WITH YOUR ASSIGNMENT. DOING so will RESULT in RECEIVING a GRADE of ZERO for the assignment even if YOU TURN it in by the due date and time.

 

  1. You must include your full name, student id number, and lab section number in a comment at the beginning of your c code file.