Home > Back-end >  For help how to statistical characters in a string in the array the number of occurrences of
For help how to statistical characters in a string in the array the number of occurrences of

Time:02-28

C how to calculate the number of each string in an array of strings, and won't be dealt with, because is an array of strings for bosses to give directions
Pasmin123
Pas123456
Pasmin @ 123
Pasrftyuiop
Pasrftyuiop
Pas3456
Pas3456
Pasmin123
Pasmin @ 123
Pas456
Pas3456
Like this string

CodePudding user response:

Small is a just a comparison,
Large scale can hash it,

Keywords: size

CodePudding user response:

Char * STR="pasmin123";
Long count [128];

char *p=str;
While (* p)
{
The count [* p] + +;
p++;
}

A. the ASCII for 97
So the statistics after the completion of a repeat count is the count [97]
  • Related