Hello guys , so I im working on this program were I have read two files (one file is a dictionary that has 16,000 words) and the other one has keywords (only has 84 keywords) and then I have to store them In arrays,and after that I have to sort them. They need to be sorted because after were going to have to use bionary search to see if the keywords are in the dictionary(there should be between 20-30 keywords missing). Right now Im trying to check if their sorted correctly by printing them on a file, however when I open the file to see what was printed the words go from A-Z but then it starts again from A-Z but with different words(all the words printed are still words from the file)
Now for this program I dont have to print out the sorted words to another file.(on the file I just need to print all the keywords not found on the dictionary ex: keyword not found: alignas) But like I said earlier Im doing this to check if they are getting sorted correctly.
So why are they getting sorted A-Z and A-Z ? and how can I fix it? ps. as of right now ive only touched the dictionary file,im not allowed to use vectors,and only allowed to use bubble or selection sort. here the link to the file im using https://pastebin.com/frRJQTpd
What you are seeing is the difference between upper and lower case.
Upper case A-Z are represented by 65-90.
Lower case a-z are represented by 97-122.
Therefore a word starting with upper case is going to sort before lower case. http://www.asciitable.com/