Question: PLease using C, not C+ or C++, Thanks. Files to submit: anagram.c Time it took Matthew to Complete: 15 mins Requriements Program must compile with

PLease using C, not C+ or C++, Thanks.

Files to submit: anagram.c

Time it took Matthew to Complete: 15 mins

Requriements

Program must compile with both -Wall and -Werror options enabled

Submit only the files requested

Use doubles to store real numbers

Print all doubles to 2 decimal points unless stated otherwise

Restrictions

No global variables may be used

Your main function may only declare variables and call other functions

Description

Write a program that checks if two strings are anagrams. A string is an anagram of another string if the letters in the first string can be rearranged to form the second string. For example army and Mary are anagrams because the letters in army can be rearranged to form Mary.

Details

Your check if two strings are anagrams should be case insensitive

MARY and army are anagrams

Assumptions

Input will always be valid

No string will be longer than 20 characters

Hints

Don't forget that ou can add to and subtract from characters

'B' - 'A' is 1

2 + 'A' is 'C'

Examples

User input has been underlined.

Example 1

Please enter the first word: MaRy Please enter the second word: arMY MaRy is an anagram of arMY

Example 2

Please enter the first word: dog Please enter the second word: god dog is an anagram of god

Example 3

Please enter the first word: bob Please enter the second word: bobs bob is NOT an anagram of bobs

Example 4

Please enter the first word: aap Please enter the second word: pap aap is NOT an anagram of pap

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!