An anagram is a type of word play, the result of rearranging the letters of a wo
ID: 3534927 • 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.
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.
You can use bubble sort to sort the strings.
You can use strcmp( ) to check two sorted strings.
Assume that strings only consist of letters, no space, no digit, etc.
Assume each string consists of less than 15 letters.
Example: