Necuima 18 Posted March 18, 2015 Report Share Posted March 18, 2015 Hi Larry, As per your "Tips" on page 351, I found the binary tree suggestion in the 4th bullet point a really good one to get a better understanding of memory management as well as using recursion in C. Thanks for the suggestion. My little program reads in a text file with some words in it, parses out the words and then adds them to a binary tree stored in alphabetic word order. If the word is already in the tree, it adds to a counter of that word; if it is not in the tree it adds it and sets the count for that word to one. At the end of the file, the program prints out the words in the tree in alphabetic order plus the word counts and then deletes all the nodes of the tree. I found this exercise to be a great one in the spirit of 'revue and pursue'. Cheers from Oz. Quote Link to post Share on other sites
Larry 428 Posted March 18, 2015 Report Share Posted March 18, 2015 Thanks very much for sharing! It sounds like you're having fun learning C! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.