Computer Science, asked by aryakashyap9401, 1 year ago

Write a c plus plus program to find whether two string contain equal number of characters

Answers

Answered by yashbats11pdrkhf
0
import java.util.*;
class string.....
Answered by thiyane
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