Question: 7. Write a C program that takes as input two lines of text, each ended by the newline character ' '. It then outputs
7. Write a C program that takes as input two lines of text, each ended by the newline character ' '. It then outputs "YES" if they contain the same number of occurrences as each other of each of the 26 letters in the alphabet, and "NO" otherwise. The program should ignore all input characters that are not letters and should not distinguish between lower and upper case. Use the get char-function from and the isalpha- and toupper-functions from . For example, if the input is "William Shakespeare! " and "I'll make a wise phrase. " then the output of your program should be "YES". Hint: To use an upper-case letter stored in a variable named ch as an index in an array named frequency, you can write frequency [ch- 'A']. (3 marks)
Step by Step Solution
There are 3 Steps involved in it
Heres a simple C program that fulfills the given requirements c in... View full answer
Get step-by-step solutions from verified subject matter experts
