Question: C++ Write a function that checks whether two words are anagrams. Two words are anagrams if they contain the same letters in any order. For

C++

Write a function that checks whether two words are anagrams. Two words are anagrams if they contain the same letters in any order. For example, silent and listen are anagrams. The header of the function is as follows:

bool isAnagram(const string& s1, const string& s2)

Write a test program that prompts the user to enter two strings and checks whether they are anagrams. Here are sample runs:

Enter a string s1: silent Enter a string s2: listen silent and listen are anagrams Enter a string s1: split Enter a string s2: lisp split and lisp are not anagrams

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!