Array: Difference between revisions

Content added Content deleted
m (→‎C: some cmt fix)
Line 21: Line 21:
frequency[ch] = 0;
frequency[ch] = 0;
 
 
ch = fgetc(any_text);
while (!feof(any_text))
while (!feof(any_text)) {
if (is_a_letter(ch))
if (is_a_letter(ch))
/* if the char is a letter, then increase character slot in the freq table: */
/* if the char is a letter, then increase character slot in the freq table: */
frequency[ch-'A'] += 1;
frequency[ch-'A'] += 1;
ch = fgetc(any_text);
}


==Computational metrics==
==Computational metrics==