Develop a program in C that Opens and reads words from a fil

Develop a program in C that: Opens and reads words from a file called fairy_tails, which contains one word per line. Each word has maximum length equal to M. The number of words in the file is equal to N. For each word that you read form the file, create a function (Word_Insert) that creates a not in a Binary Search Tree with the name my_words. Each node of the tree must contain one word. The left child must contain a word that it is lexicographically smaller while the right child contains a lexicographically bigger one. When you finish reading the file, ask form the user to give three words as input. Create a function Search Words which searches the tree for the given, by the user, words. The function should return a percentage that shows how many of these words exist in the tree. Create a function PrintFile which prints the words exactly as they appear in the file. Create a function PrintSorted that prints all the words in a lexicographical order. Choose a value for M and N. N should be greater than 10.

Solution

//Function which searches the tree for the given by user words

//PrintFile which prints the words exactly as they apper in the file

//print the words in Lexicographical order

int i, j;

//taking character array of [10][50]

//comparing the second and first values

 Develop a program in C that: Opens and reads words from a file called fairy_tails, which contains one word per line. Each word has maximum length equal to M. T

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site