Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

An anagram is a type of word play, the result of rearranging the letters of a wo

ID: 3534601 • Letter: A

Question

An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once; for example orchestra can be rearranged into carthorse. Write a program that scans two strings and checks if the two strings are anagram to each other. You need to provide a way to stop the program properly. Using Ctrl+D is not required.

Requirement:

 Your program should call anagram() function to check if the two strings are anagram. int anagram(char *s1, char *s2);

 This function should return 1 if s1 and s2 are anagrams, otherwise returns 0. Hint:

 you can use bubble sort to sort the strings.


Example:

Explanation / Answer

http://ideone.com/12Jlwr

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote