Question: Write a function called isAnagram that takes two strings as arguments and returns a boolean true if the two strings are anagrams, otherwise it returns

Write a function called isAnagram that takes two strings as arguments and returns a boolean true if the two strings are anagrams, otherwise it returns false. Two strings are anagrams if the letters can be rearranged to form each other. You MUST use the C string library or string class functions to complete this code. (no sort functions)

MAKE SURE THE FUNCTION IS NOT CASE SENSITIVE AND SHOULD DISREGARD ANY PUNCTUATION OR SPACES.

#include

#include

#include

#include

using namespace std;

bool isAnagarm (string s1, string s2){

To test the code enter "Eleven plus two as string s1 and Twelve plus one as string s2. The function should return true.

Rats and Mice as string s1 and in cats dream as string s2 should also return true.

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!