1.Anagram words
Write a C code that asks users to enter two words, one after the other and checks if these words are anagrams (permutations of the same letters).
For instance, the words “smartest” and “mattress” are anagrams.
Examplea
Run 1:
Please enter first word: lookplease enter the second word: coolSorry! “cool” and “look” are not anagrams.
Run 2:
Please enter first word: masters
please enter the second word: smartes
Yes! “masters” and “smartes” are anagrams.
Hint:
1.If you sort the two words that are anagrams, they will become identical! For instance, “smartest” and “masters” both sort to “aemrsstt”
2.You can use all functions in
3.Sorting a string is exactly similar to sorting an array. You just need to know the length of the string and make sure you do not touch the terminating null.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here