Færdiggjort

C code Dictionary

This project is for my Intro to C code Class for my AA degree. Deadline is 3 weeks, due on the 13th of december

Write a C program that prompts the user for a series of letters. The program will read in the letters and print out which dictionary words can be made from the provided letters. The dictionary is provided as a text file.

In very general terms, determining if a given word can be made from the given letters will require counting how many distinct kinds of letters there are in the given letters and in the words.

For example, assume that the word “bull” is in the dictionary. The word “bull” contains 1 ‘b’ character, 2 ‘l’ characters, and 1 ‘u’ character. Now say the input letters were “alblldi”. In “alblldi”, we have enough ‘b’ characters for “bull”, since “alblldi” contains at least 1 ‘b’ character. Similarily, “alblldi”, has enough ‘l’ characters for “bull”, since “alblldi” contains at least 2 ‘l’ characters. However, “alblldi” does not have at least 1 ‘u’ character, and as such we know that we cannot make “bull” from “alblldi”.

Dictionary file

Read in the dictionary words from a file. The name of the dictionary file must be “[login to view URL]”. Make the following assumptions about the dictionary file:

Each line contains the words that begin with particular letter.

The words in each line are separated by tab (\t).

Each word consists only of lowercase letters in the range a-z.

The maximum length of a single line is 99 characters.

The maximum number of words is 1000.

If you cannot open the dictionary file, you should print “Failed to open dictionary file ‘[login to view URL]’”, followed by a newline, and then exit the program.

Program requirements

The program must meet the following requirements:

The program keeps asking the user for letters until the letters are exit.

The program prints words in the dictionary that could be made in alphabetic order, as specified in the dictionary.

The program prints out what letters were typed in, followed by a colon (:), followed by a list of the words that could be made (if any).

Each word that could be made is prefixed by a tab character (\t).

If the user types an upper case letter your program must convert it to lower case.

Your program must check if each character is a valid letter of the English alphabet, if it is not then that character is discarded.

Program output

For instance, the following would be some output from your program:

enter letters: alblldi

alblldi:

ball

bill

enter letters: moo

moo:

enter letters: bleppa

bleppa:

ape

apple

enter letters: exit

Implementation Hint

There are a lot of different ways to perform this sort of counting, but the shortest way will probably involve an array of 26 integers, one for each letter of the alphabet. The first index in this array refers to the number of ‘a’ characters, the second index the number of ‘b’ characters, and so on.

Grading System

If the program runs your maximum grade will be 100/100

If the program doesn’t run your maximum grade will be 50/100

In either case the following will be checked during the grading process:

( 5%) Indentation

( 5%) Meaningful comments (at least 1 per function, and 1 per conditional/repetition statement)

(10%) Reading the dictionary file line by line, and closing the file correctly when finished

(15%) function that can count the number of times each character appears in a given word

(15%) function that can determine if a word can be made given the letter counts for the word and the input letters.

(30%) Iterate through the dictionary, executing the above code for each word in the dictionary. Print out the words that can be made, using the format specified before. In other words, if your program runs and does what it is supposed to do.

(20%) Answering correctly four (4) questions about your code during the one on one project interview.

This is what the preset dictionary txt file looks like -

ape apple

ball bill bull

foot

parrot pebble

season

zebras zoo

Evner: C programmering

Se mere: code search file extension different drives, code dictionary widget, ways perform extractions excel, pop balloon different ways, code dictionary j2me, different ways spin articles, source code dictionary j2me, iphone code dictionary, source code dictionary midp, source code dictionary project, code dictionary projects using java, description creation source code dictionary j2me netbeans, source code dictionary program, source code dictionary software, create android source code dictionary, remuneration data accessed polymorphically different ways, source code dictionary java using binary search tree, vba code correlation monte carlo different distributions

Om arbejdsgiveren:
( 1 bedømmelse ) Doral, United States

Projekt ID: #28266957

Tildelt til:

Ahmed8033

Hello dear, I am Computer Scientist and have a very good understanding of C programming and algorithms. I can do your task. Inbox me

$150 USD in 5 dage
(3 bedømmelser)
2.9

12 freelancere byder i gennemsnit $127 timen for dette job

igor7stepanov20

Hello. I'm pretty happy to bid on this interesting project. I read your description carefully and I think that I am the developer you are looking for and are suitable for this task. I have rich experience in C/C++ Prog Flere

$220 USD in 4 dage
(17 bedømmelser)
4.6
maximous49

hi I am really interested in your project I am new to Freelancer so I placed a bid for a low price But I have full experience of c programming I could finish your project in high quality, in short timeline I could sati Flere

$140 USD på 1 dag
(7 bedømmelser)
4.1
AsifShimon

Hi, i have worked with dictionary building data structures before. I have some ideas about how to this. Let me know if you are interested. Thanks in advance.

$75 USD in 6 dage
(20 bedømmelser)
4.1
baltickriscoder

Dear Client, Nice to meet you. I have checked your requirement. My special skill for Algorithm is ML and Genetic Algorithm. Dev tools are C/C++, C#, Java and Matlab. I am well-experienced in Data Structure and Algorit Flere

$200 USD in 3 dage
(3 bedømmelser)
2.4
danchiksvetliy

Dear. I am confident in your project and I can finish it clearly on time. I am well experienced and skillful C/C++ programmer as you can see my past works on this site. I ensure the best quality of your project and t Flere

$150 USD på 1 dag
(2 bedømmelser)
2.6
Wanngming

HI Thanks for your kind job offer. I have checked you project detail very carefully so that I feel 100% sure in it. I have rich experiences in C. I can finish it on time with A++ grade. I hope your kind reply. Thanks M Flere

$50 USD in 2 dage
(1 bedømmelse)
1.2
brunadowling1

Hello. How are you?... I am senior and full stack developer to have experience of development for 8 years. Below are skills that I have. • Languages: Python, Ruby, PHP, Java, Node, Golang, Objective C, C, C++, C#, Q Flere

$140 USD in 7 dage
(1 bedømmelse)
4.0
Oblivious123

Hello, I am a software developer in my senior year at university. I have been programming in C for 8 years now, and have extensive experience with it. I have developed many similar projects and assignments so I am conf Flere

$115 USD på 1 dag
(0 bedømmelser)
0.0
sinnugan38

Hi! I am happy to put my bid on here. I have read your requirement carefully and I am interested in this project. I have a tons of experience in C# /C++ /C and Python. I don`t have a review because i came into in this Flere

$100 USD in 2 dage
(0 bedømmelser)
0.0
Ner027

As a student, this is the type of project I work with the most.I know what type of code teachers like and how they like to see things implemented.

$60 USD in 5 dage
(0 bedømmelser)
0.0
Bingfeng234

Hi, there. I CAN START JUST NOW. i can build your dicitionary I have got your project requirement enough. I am a creative and professional C++ developer having more than 5+ years of professional experience as a senior Flere

$120 USD in 2 dage
(0 bedømmelser)
0.0