Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int countRecurringCharacters(char *line) {
- int count = 0;
- char countRepeat[256];
- register int i;
- for(int i = 0; i < 256; i++) {
- countRepeat[i] = 0;
- }
- while (*line) { //here
- countRepeat[*line]++;
- line++;
- }
- for (i = 0; i < 256; i++) {
- if (countRepeat[i] > 1) {
- count++;
- }
- }
- return count;
- }
Advertisement
Add Comment
Please, Sign In to add comment