I am stuck in this program please remove the error and send back to me.
Be given a string of chars, where each single char belongs to the following alphabet: a..zA..Z0..9 (So, in the string there are only lowercases, uppercases and digits. No blank, no comma, ...).
For every char of the given alphabet, count how many times in the string
1-- the char belong to a sequence of identical chars whose length is at least three (i.e.: in the string cc74uyrpfccc348fhsjcccc3848djccccc484jd for three times the character 'c' satisfies this condition)
Code:
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
char* alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
int alphalength[] = strlen(alphabet);
char str[100];
int i,j,count,f1,f2,l=1;
printf("Enter string\n");
gets(str);
int strlenght[] = strlen(str);
for (i=0; i < alphalength; i++)
{
count=0;
for (j=0; j<=strlength; j++)
{
if (strlength[j] == alphalength[i])
count=1;
if (strlength[j+1] == alphalength[i+1] && strlength[j+2] == alphalength[i+2])
}
printf("%c", j);
count+2;
}
while(j=count);
}
}
getch();
}
2-what is the longest substring of characters strictly rising interm of ASCII code(the following is greater (>) of the previous)
3- what is the longest substring of successive characters interm of given string rannge (i.e.: fhkjshdfruytyzABCDEfglsj => 7)