Question: - Also program should be written in C - Also a function should have a brief comment above its definition describing what it does. //////////////////////////////////////////////////////////////////////////////////////////

- Also program should be written in C
- Also a function should have a brief comment above its definition describing what it does.
////////////////////////////////////////////////////////////////////////////////////////// // anagram.c
#include
int main() {
char ch; int letter_counts[N]= {0}; int i; int count =0;
printf("enter a word: ");
while((ch=getchar())!= ' ')
{ letter_counts[ch - 'a']++;
}
for(i =0;i printf("enter the second word: "); while((ch=getchar())!= ' ') { letter_counts[ch - 'a']--; } for(i =0;i for(i =0;i if(count == N) printf("The words are anagrams. "); else printf("The words are NOT anagrams. "); return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
