This homework is to be done individually. You may ask your instructor for help, but do not ask other students, tutors, or mentors for assistance. Do NOT use solutions available on the web! You may use your textbook for help.
This program gives you more practice with strings and arrays. For hints, see King chapters 8 and 13. You will be required to write a function that passes strings (as char *) to a function in order to receive full points on the assignment.
See the "Grading" section below for specific criteria for this assignment. As with all projects and homework, the style guidelines apply to this assignment, and points may be deducted for poor style, readability, and testing. Feedback will be given using a version of this checklist.
This program will request two words (or phrases) from the user and determine if they are anagrams. Anagrams are two words or phrases that have the same letters but in different order. An example given at Wikipedia is that "listen" and "silent" are anagrams of each other. When determining if two words/phrases are anagrams, spaces and capitalization are generally ignored.
If you have trouble finding valid anagrams for testing, try using this site that has common word anagrams to help you out.
Your program should request two words/phrases from the user.
You can assume that each word will be no longer than 50 characters long. Words may be capitalized, but your program should ignore differences in capitalization when determining if two words are anagrams. In other words, A and a should be considered a match.
If the user enters a word containing numbers or other characters, you should accept those words, but your program should ignore numbers, spaces and other characters when deciding if the two words are anagrams.
Your program should print out both words/phrases (retaining capitalization and any extraneous characters) and print a message indicating if they are or are not anagrams.
An example of input and output:
You can tackle this program in a few different ways. Our textbook lists one approach in the programming projects section at the end of chapter 8, but to give you more practice with functions and strings, you MUST use a function to determine if the strings are anagrams, and this function must accept two strings as parameters. So, to summarize:
char *s. The function may return a boolean or an integer.
This homework programming assignment will make use of the general grading form for program style. Points may be deducted for poor programming style.
Additionally, these specific criteria will be used to grade this assignment, which is worth 25 points.