Toggle navigation
Courses
Questions
Tags
Users
Midterm Question 1 (15%)
0
like
0
dislike
5.9k
views
Write a program to count the highest occurrence of a single character in a string, Hint: This problem is only concerned with lowercase letters and single words, no sentences
example
input: aaaaaaaaaabb
output : 10
input: aaaabbbccccceeeezzzzzzz
output : 7
[Exam]
asked
Apr 13, 2017
in
Midterm
ID: 23784 -
Available when:
Unlimited
-
Due to:
Unlimited
reshown
Oct 16, 2017
by
thopd
|
5.9k
views
comment
Please
log in
or
register
to add a comment.
47
Answers
0
like
0
dislike
Hidden content!#include<stdio.h>
#include<ctype.h>
#include<string.h>
int main()
{
** * **** * **** * * * i, j, flag[26]={0}, max=0;
*** * * * * * * * * ** * * ** letter[26]={
** *** ** ** * * * ** * * * * * * * * ** * **** 'b',
* ** * * * * * * * * * * *** ** ** * * * * 'd',
* ** * * * * * ** * * * * * * ** * * * * 'f',
*** * * * ** * * * *** * * *** * * * * * * 'h',
* * ** ** ** ** * ** * * * * * ***** * * * ** * * ** ** **** 'j',
*** * * ** ** * ** ** * ** * ** * * ** ** 'l',
* ** * * * ** ** *** * ** ** * * ** * * 'n',