the program i am working on will read a dictionary file with over 25000 words. it will check for repeating characters, if there are 4 characters repeated in a string then it prints out that straing with a * at the end, if 5 characters are repated then ** at the end. so far i got this to work great, but i also need so at the end of everything, it prints out the SHORTEST string with 4 repeated characters and the SHORTEST string with 5 repeated characters.
Heres my code:
Also the long "if" statement you see commented out in middle of the program is for the second part of the program. For the second part i need the program to text for singular and cumulative stem sequences. a singular stem sequence for example:
int charrepeatamount (char , char );
void addasterisks(char );
/*while(flag != EOF) //add when prog done
printf("3");*/ //for next part of program
int charrepeatamount (char string, char character)
if(pt == NULL)
while(pt != NULL)
void addasterisks(char string)
if(repeated4times > 0)
if(repeated5times > 0)
where first string is the begining of next few strings
where first string is the begining of the next string and the second string is the beginging of the 3rd.
At the end it should print out the length of longest stem sequence.
Any help would be greatly appricated.