Write interactive C programs to perform the following on strings:
(a) To check if two strings are Anagram.
(b) To check whether the given alphabet is a vowel or consonant.
(c) To convert the given string from lower case to upper case without using the inbuilt function in
(a) To check if two strings are Anagram:
#include <stdio.h>
#include <string.h>
int isAnagram(char str1[], char str2[]) {
int len1 = strlen(str1);
int len2 = strlen(str2);
if (len1 != len2) {
return 0;
}
int count[26] = {0};
for (int i = 0; i < len1; i++) {
count[str1[i] - 'a']++;
count[str2[i] - 'a']--;
}
for (int i = 0; i < 26; i++) {
if (count[i] != 0) {
return 0;
________ ____ _________ ________ ___ _____ _______ ____ _____ ____ ______ _________.
____ _______ __________ ______ _______ _____ ______.
___ ___ ________ __________ _____ ___ _____ _______ _________ __________.
_______ ________ ______ _________ _________ _____ ________ _____.
____ ____ ___ ______ ______ ___ ______ _______ ____ ________.
__________ ___ ____ __________ ____ __________ _______ ___ __________.
_____ _____ ______ _________ ________ _____ __________ _________ _______ ___ _______.
_______ _______ _________ __________ _____ ________.
_____ ________ ____ _____ ____ _______ _______ _____ _________.
______ ____ _____ ______ ______ _______ __________ _________.
______ _________ _________ ________ ______ ______.
________ _____ ____ ________ ____.
___ _________ ___ _____ _____ ________ _______ ________.
____ ________ _______ _________ ___ ____ ___.
___ ______ ____ ____ __________.
_______ ________ __________ ______ __________ ______ ______ ________ _________ ______ _________.
_______ _______ ______ ___ ____ _______.
___ ___ ___ __________ ________ ____ ______ _______ ____.
_______ _________ ______ ____ _________ ______ _______ ____ ____ _______.
__________ _________ _________ ____ ________ _________ ___ ___.
__________ __________ __________ __________ _________ _____ _________ ______ ________.
______ ______ __________ ________ __________.
_______ _______ ________ __________ _____ ________ ____.
__________ _________ _______ _________ ___ _____ __________.
___ _______ ____ ________ _____ ______ _____ ____ _______ ______ _______.
_____ ______ _______ ________ __________ _______ __________ ____ _________.
____ ________ _____ ____ _________ _____ ___ _____.
_________ ________ ________ _______ ______ ___ _________ _________ ________ _________ _________ ___.
_____ ___ _____ ____ ______ ______ ___ _____ ___.
________ ____ _____ _____ ______ __________ ________ _____.
_________ ___ _____ ____ ___ __________ ________ ________.
__________ ___ ____ _____ __________.
____ ______ _______ __________ _________ _________ _________ ____ ___ ________ __________.
______ _______ __________ ____ ______ ______ ___ ______.
______ ______ ________ ________ __________ ____.
__________ _________ __________ __________ _______ __________ ___ ____ ______.
_____ ______ _________ _____ ________ _____ __________ _______.
____ ___ ______ ________ ___ ________ __________.
________ ___ _______ _____ ____ __________.
____ _______ _________ ____ _____.
______ ___ _________ ______ ____ _______ ____ _____ ______ _________.
__________ ________ _________ _________ ____ ___ _____ _____ __________ ______.
_________ ____ _________ ________ ____ ____ __________ _________ _______ ___ __________ _________.
______ _______ ______ ______ ______ _____ ______ ______ ________ _________ _____ _________.
_______ __________ _______ __________ __________ _________ _____ _________.
______ ________.
Get Full Answer on WhatsApp