Need help in programming plz?
dont know how to do the deal i need assist with do this if some one can do it personally i effectively be prized
Write a whole C application called MyDictionary because follows:
– Define/declare the following global issues:
State a dictionary access structure
struct entry
char *word;
char *definition;;
Declare a multitude of entries Dictionary with a maximum connected with 1000 work.
Declare a strong integer counter-top that counts the quantity of entries inside the dictionary.
– Write your function identified as AddEntry that will add a fresh entry to help Dictionary.Within this function prompt the consumer to enter both concept and definition from the new gain access to.
– Write any function labeled DictionarySort in which sorts any dictionary into alphabetical get.
– Write the function labeled DictionarySearch that visit a word inside a dictionary
– In the principle function:
o Prompt the consumer to enter the quantity of entries to add and call AddEntry function to incorporate entries for you to Dictionary.
o Sort Dictionary using DictionarySort job.
o Read your word out of standard enter and search for its explanation inside Dictionary utilizing DictionarySearch job.
Methods:Use among Cs powerful memory allocation characteristics to spend memory pertaining to strings.Assume that the maximum size is SOMETHING LIKE 20 characters pertaining to word and also 100 characters for definition and they are one stringed without gaps.
Submitter:
Include the code accompanied the output influenced by the on top of values, printed with all the tops command line and submitted with the DUE day.
#include
struct entry
char *word;
char *definition;
;
struct entry Dictionary1000;
struct entry AddEntry(int totalwords)
struct entry wordanddef;
int post;
with regard to (i=0; i<totalwords; i++)
printf(“Enter expression %i from %i\n”, i+1, totalwords);
scanf (“%s”, &wordanddef.word);
printf(“Enter definition %i from %i”, i+1, totalwords);
scanf (“%s”, &wordanddef.definition);
//Dictionaryi=wordanddef;
returning wordanddef;
int key (void)
int total;
struct entry word;
printf(“Enter total availablility of words using definitions that should be entered”);
scanf(“%i”, &total);
term = AddEntry(total);
printf(“%c”, term.word);
that what relating to so not even close here my partner and i dont know how to proceed can quite a few one undertake it or lat me determine what i need to do
Try this
#include
struct entry
char *word;
char *definition;
;
struct entry Dictionary1000;
useless AddEntry(int totalwords)
struct entry wordanddef;
int post;
with regard to (i=0; i<totalwords; i++)
printf(“\nEnter expression %d from %d\n”, i+1, totalwords);
scanf (“%s”, &wordanddef.word);
printf(“\nEnter definition %d from %d\n”, i+1, totalwords);
scanf (“%s”, &wordanddef.definition);
Dictionaryi=wordanddef;
printf(“\nThe expression is %s and also the def is usually %s\n”, &Dictionaryi.term, &Dictionaryi
useless DictionarySort(int total)
int post, j;
struct entry temp;
for(i=0; i<total; i++)
for(j=0; j<i; j++)
if(&Dictionaryi<&Dictionaryj)
temp=Dictionaryi;
Dictionaryi = Dictionaryj;
Dictionaryj = temp;
useless DictionarySearch(char *word, int total)
int i=0, found=0;
for(i=0; i<total; i++)
if(word==Dictionaryi.word)
printf(“\nFound the word in dictionary\n”);
printf(“\nThe expression is %s and also the definition will be %s\n”, &Dictionaryi.term, &Dictionaryi
found = JUST ONE;
break up;
if(! found)
printf(“The word is not found from the dictionary”);
int key (void)
int to
Leave a Reply
You must be logged in to post a comment.