Write a c plus plus program to find whether two string contain equal number of characters
Answers
Answered by
0
import java.util.*;
class string.....
class string.....
Answered by
0
Answer:
here u go
Explanation:
#include <iostream>
using namespace std;
int main() {
char str[100] = "this string contains many alphabets";
char c = 'a';
int count = 0;
for(int i = 0; str[i] != '\0'; i++) {
if(str[i] == c)
count++;
}
cout<<"Frequency of alphabet "<<c<<" in the string is "<<count;
return 0;
}
Similar questions