Write a program to perform following
• Read a text file, line by line and split every word.
• Cleanup the text such that every word will have only alphanumeric characters. No special characters are allowed in the word.
• Store every word of this file in a Binary Search Tree (BST). Duplicate words should be ignored. You don’t need to store them.
• Display the tree.
Users must be able to perform following facilities
• Should be able to provide the file name for text input. So make a function to take input.
void readFile(Char* fileName, Struct node** rootRef);
• Should be able to search a word in the BST. So provide a function to search a word.
Boolean search(char* word);
• Should be able to print the BST. So provide a function to print BST with following provisions:
void printTree(struct node* root);
o Should be able to print whole or part of BST
o If a subtree is to be printed, user will provide the “word” and subtree with this word as root will be printed.
• Should be able to delete a word from the tree. So provide a function to delete a word from the tree. Remember the subtree will not be deleted; only this word is deleted. Remaining subtree needs to be re-adjusted in the tree.
Boolean deleteWord(char* word);
Create following files:
1. mainProgram.c //containing basic input, output user interfaces and program logic as well as all the functions mentioned above
2. mainProgram.h //containing all function prototype and type definitions, global variables etc.
3. supFunctions.c // containing all necessary function required but not mentioned above.