Why it is not cleared any test cases

#include
#include
using namespace std;
char max_frequency( char *str)
{
int l1=strlen(str);
int freq[26]={0};

for(int i=0;i<l1;i++)
{
freq[str[i] - ‘a’]++;
}
int max=-1;
char result;
for(int j=0;j<26;j++)

  if(max<freq[j])
  {
	  max=freq[j];
	  result =(char)(j+'a');
  }
  return result;

}
int main() {
char str[1000];
cout<<“ENTER YOUR STRING:”<<endl;
cin.get(str,1000);
cout<<"max frequency character is "<<endl;
cout<<max_frequency(str);
return 0;
}

Hello @Srajanjaiswal,
print only those statement that is asked in output format
image

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.