Write a C++ program that does the following :
1. Create an char array of size 20. Assign * to each location inthe array indicating that the array is empty..
2. Populate first 15 elements of the array with randomcharacters between A – Z. inclusive. Use the following formula inorder to hash and store each character in its properposition/location. Generated character % 10;
3. Should a collision occurs , use Linear probing to find nextavailable position / location. Use the following probing hashingfunction. ( Generated character + 1 ) % 10 ;
4. Display and introduction message followed by the generatedarray. The generated array should be displayed in 2 lines. Eachline contain 10 characters separated by 3 spaces
5. At the end , the program should display the number of linearprobing that took place when inserting an element , searching foran element , or deleting an element.
At the beginning , the program displays a menu on the screenallowing the user to do the following :
A) Display the generated array.
B) Search for a Character ( between A – Z ) in the array.
C) Insert new Character ( between A – Z ) in the array.
D) Delete a character ( between A – Z ) from the array.
X) End the program
• Just one .cpp file.
• A Message is displayed when inserting a char in the table.
• A Message is displayed when searching for a char and char isnot found.
• A Message is displayed when deleting a char and char is notfound. • Modify the search and delete functions such that thefunctions uses hashing and rehashing functions when searching anddeleting characters form the table. You are not allowed to usesequential search for locating and deleting character from thetable. Add appropriate code in order to keep a track of linearprobing when inserting characters in the hash table.
• Menu selection is case sensitive and validation on menuselection items must be implemented
Answer to Write a C++ program that does the following : 1. Create an char array of size 20. Assign * to each location in the array…