#include<stdio.h>
#define N 100
char find_max_occurrence(char str[])
{
int num_chars = 0, i, j, count[N] = {0}, max_occr_idx;
char chars[N];
for(i = 0; i< ; i++)
/* 遍历字符串中所有字符 /
{
/ 查找str[i]在chars数组中的下标j */
for(j = 0; j < num_chars && != ; j++)
/*str[i]在chars数组中找不到的情况将 str[i]添加到chars数组末尾 /
if(j == num_chars)
{
= str[i];
num_chars++;
}''
count[j]++;
/ str[i]对应字符的统计数加1 */
}
max_occr_idx = ;
for(i = 1; i < num_chars; i++)
if( )
max_occr_idx = i;
return chars[max_occr_idx];
}
main()
{
char str[N];
printf("Input:\n");
gets(str);
//输入字符串
printf("Character having max occurrence:\n%c", );
}
空在哪