Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello I have a C Programming assignment i attached question there are 2 txt file smalldictionary.txt and dictionary.txt i write small dictionary txt but dictionary

Hello I have a C Programming assignment i attached question there are 2 txt file smalldictionary.txt and dictionary.txt i write small dictionary txt but dictionary txt has too many words the internet page collapses i upload and attached link smalldictionary.txt: aardvark abs abby acres ann anna apple basic book capes claustrophobic cool dog earnest fog goods homes hoods inner jello kite inside languish merry modest mouse new nutty obvious odious omniscient powerful prod quintessential rare rocks ropes socks sores tortoise tuple up viscous whet xylophone yiddish zebra Dictionary.txt: http://dosya.co/vhle6o47fg3p/dictionary.txt.html

thank you for your helps image text in transcribedimage text in transcribed

Part 1. Standard telephone keypads contain digits 0 through 9. The numbers 2 through 9 each have three or four letters associated with them. The numbers from 2-9 represent letters as follows: 2 ABC 3 DEF 4 GHI 5 JKL 6 MNO 7 PQRS 8 TUV 9 WXYZ Many people find it hard to memorize phone numbers, so they use the correspondence betweern digits and letters to make meaningful words that represent phone numbers. Since multiple letters map to a single number, a single number may represent multiple words. For example the number 2665 reprsnts "book an "cool, among other possibilities In this homework you will assume that the telephone numbers have 5 digits only. You will write a C-program that will take a 5-digit phone number and print to stdout all the meaningful words it can represent. In order to decide if a word is meaningful, you will use a dictionary I provide two files small-dictionary.txt and dictionary.txt which contains one word per line (in English. You will use input redirection to redirect the dictionary file into your progranm (that means your program will read from standard input), and store each word in an array of strings. There are 80368 words in the large dictionary I provide, so your array should be at least of that size. For each word you generate, look it up in the dictionary, if found, print it to standard output Note that, the dictionary is sorted, and you should use binary search when looking up a word (much faster than sequential search) The user enter the telephone number as a commandline argument using the flag -t number. Your program will print ALL possible words for a given telephone number For example: hu3 t 76257

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

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

The amount of work I am asked to do is reasonable.

Answered: 1 week ago

Question

The company encourages a balance between work and personal life.

Answered: 1 week ago