Language: C

#include<stdio.h>
#include<string.h>

int main(void){
char s[4906];
int count[128] = {0};
int len;
while(scanf("%[a-z,A-Z, .\n 0-9,(),<>,=,@,",!, - ]", s) != EOF){

  len = strlen(s);
  for(int i = 0; i < len;i++) {
    count[s[i]]++;
  }
}  
printf("a : %d\n",count['a']+count['A']);
printf("b : %d\n",count['b']+count['B']);
printf("c : %d\n",count['c']+count['C']);
printf("d : %d\n",count['d']+count['D']);
printf("e : %d\n",count['e']+count['E']);
printf("f : %d\n",count['f']+count['F']);
printf("g : %d\n",count['g']+count['G']);
printf("h : %d\n",count['h']+count['H']);
printf("i : %d\n",count['i']+count['I']);
printf("j : %d\n",count['j']+count['J']);
printf("k : %d\n",count['k']+count['K']);
printf("l : %d\n",count['l']+count['L']);
printf("m : %d\n",count['m']+count['M']);
printf("n : %d\n",count['n']+count['N']);
printf("o : %d\n",count['o']+count['O']);
printf("p : %d\n",count['p']+count['P']);
printf("q : %d\n",count['q']+count['Q']);
printf("r : %d\n",count['r']+count['R']);
printf("s : %d\n",count['s']+count['S']);
printf("t : %d\n",count['t']+count['T']);
printf("u : %d\n",count['u']+count['U']);
printf("v : %d\n",count['v']+count['V']);
printf("w : %d\n",count['w']+count['W']);
printf("x : %d\n",count['x']+count['X']);
printf("y : %d\n",count['y']+count['Y']);
printf("z : %d\n",count['z']+count['Z']);
return 0;
}



Compiler output:
main.c: In function 'main':
main.c:8:46: error: expected expression before ',' token
    8 | while(scanf("%[a-z,A-Z, .\n 0-9,(),<>,=,@,",!, - ]", s) != EOF){
      |                                              ^
main.c:8:49: error: expected ')' before ']' token
    8 | while(scanf("%[a-z,A-Z, .\n 0-9,(),<>,=,@,",!, - ]", s) != EOF){
      |      ~                                          ^~
      |                                                 )
main.c:8:50: error: expected statement before ']' token
    8 | while(scanf("%[a-z,A-Z, .\n 0-9,(),<>,=,@,",!, - ]", s) != EOF){
      |                                                  ^
main.c:8:51: warning: missing terminating " character
    8 | while(scanf("%[a-z,A-Z, .\n 0-9,(),<>,=,@,",!, - ]", s) != EOF){
      |                                                   ^
main.c:8:51: error: missing terminating " character
    8 | while(scanf("%[a-z,A-Z, .\n 0-9,(),<>,=,@,",!, - ]", s) != EOF){
      |                                                   ^~~~~~~~~~~~~~
main.c: At top level:
main.c:15:8: error: expected declaration specifiers or '...' before string constant
   15 | printf("a : %d\n",count['a']+count['A']);
      |        ^~~~~~~~~~
main.c:15:19: error: unknown type name 'count'
   15 | printf("a : %d\n",count['a']+count['A']);
      |                   ^~~~~
main.c:16:8: error: expected declaration specifiers or '...' before string constant
   16 | printf("b : %d\n",count['b']+count['B']);
      |        ^~~~~~~~~~
main.c:16:19: error: unknown type name 'count'
   16 | printf("b : %d\n",count['b']+count['B']);
      |                   ^~~~~
main.c:17:8: error: expected declaration specifiers or '...' before string constant
   17 | printf("c : %d\n",count['c']+count['C']);
      |        ^~~~~~~~~~
main.c:17:19: error: unknown type name 'count'
   17 | printf("c : %d\n",count['c']+count['C']);
      |                   ^~~~~
main.c:18:8: error: expected declaration specifiers or '...' before string constant
   18 | printf("d : %d\n",count['d']+count['D']);
      |        ^~~~~~~~~~
main.c:18:19: error: unknown type name 'count'
   18 | printf("d : %d\n",count['d']+count['D']);
      |                   ^~~~~
main.c:19:8: error: expected declaration specifiers or '...' before string constant
   19 | printf("e : %d\n",count['e']+count['E']);
      |        ^~~~~~~~~~
main.c:19:19: error: unknown type name 'count'
   19 | printf("e : %d\n",count['e']+count['E']);
      |                   ^~~~~
main.c:20:8: error: expected declaration specifiers or '...' before string constant
   20 | printf("f : %d\n",count['f']+count['F']);
      |        ^~~~~~~~~~
main.c:20:19: error: unknown type name 'count'
   20 | printf("f : %d\n",count['f']+count['F']);
      |                   ^~~~~
main.c:21:8: error: expected declaration specifiers or '...' before string constant
   21 | printf("g : %d\n",count['g']+count['G']);
      |        ^~~~~~~~~~
main.c:21:19: error: unknown type name 'count'
   21 | printf("g : %d\n",count['g']+count['G']);
      |                   ^~~~~
main.c:22:8: error: expected declaration specifiers or '...' before string constant
   22 | printf("h : %d\n",count['h']+count['H']);
      |        ^~~~~~~~~~
main.c:22:19: error: unknown type name 'count'
   22 | printf("h : %d\n",count['h']+count['H']);
      |                   ^~~~~
main.c:23:8: error: expected declaration specifiers or '...' before string constant
   23 | printf("i : %d\n",count['i']+count['I']);
      |        ^~~~~~~~~~
main.c:23:19: error: unknown type name 'count'
   23 | printf("i : %d\n",count['i']+count['I']);
      |                   ^~~~~
main.c:24:8: error: expected declaration specifiers or '...' before string constant
   24 | printf("j : %d\n",count['j']+count['J']);
      |        ^~~~~~~~~~
main.c:24:19: error: unknown type name 'count'
   24 | printf("j : %d\n",count['j']+count['J']);
      |                   ^~~~~
main.c:25:8: error: expected declaration specifiers or '...' before string constant
   25 | printf("k : %d\n",count['k']+count['K']);
      |        ^~~~~~~~~~
main.c:25:19: error: unknown type name 'count'
   25 | printf("k : %d\n",count['k']+count['K']);
      |                   ^~~~~
main.c:26:8: error: expected declaration specifiers or '...' before string constant
   26 | printf("l : %d\n",count['l']+count['L']);
      |        ^~~~~~~~~~
main.c:26:19: error: unknown type name 'count'
   26 | printf("l : %d\n",count['l']+count['L']);
      |                   ^~~~~
main.c:27:8: error: expected declaration specifiers or '...' before string constant
   27 | printf("m : %d\n",count['m']+count['M']);
      |        ^~~~~~~~~~
main.c:27:19: error: unknown type name 'count'
   27 | printf("m : %d\n",count['m']+count['M']);
      |                   ^~~~~
main.c:28:8: error: expected declaration specifiers or '...' before string constant
   28 | printf("n : %d\n",count['n']+count['N']);
      |        ^~~~~~~~~~
main.c:28:19: error: unknown type name 'count'
   28 | printf("n : %d\n",count['n']+count['N']);
      |                   ^~~~~
main.c:29:8: error: expected declaration specifiers or '...' before string constant
   29 | printf("o : %d\n",count['o']+count['O']);
      |        ^~~~~~~~~~
main.c:29:19: error: unknown type name 'count'
   29 | printf("o : %d\n",count['o']+count['O']);
      |                   ^~~~~
main.c:30:8: error: expected declaration specifiers or '...' before string constant
   30 | printf("p : %d\n",count['p']+count['P']);
      |        ^~~~~~~~~~
main.c:30:19: error: unknown type name 'count'
   30 | printf("p : %d\n",count['p']+count['P']);
      |                   ^~~~~
main.c:31:8: error: expected declaration specifiers or '...' before string constant
   31 | printf("q : %d\n",count['q']+count['Q']);
      |        ^~~~~~~~~~
main.c:31:19: error: unknown type name 'count'
   31 | printf("q : %d\n",count['q']+count['Q']);
      |                   ^~~~~
main.c:32:8: error: expected declaration specifiers or '...' before string constant
   32 | printf("r : %d\n",count['r']+count['R']);
      |        ^~~~~~~~~~
main.c:32:19: error: unknown type name 'count'
   32 | printf("r : %d\n",count['r']+count['R']);
      |                   ^~~~~
main.c:33:8: error: expected declaration specifiers or '...' before string constant
   33 | printf("s : %d\n",count['s']+count['S']);
      |        ^~~~~~~~~~
main.c:33:19: error: unknown type name 'count'
   33 | printf("s : %d\n",count['s']+count['S']);
      |                   ^~~~~
main.c:34:8: error: expected declaration specifiers or '...' before string constant
   34 | printf("t : %d\n",count['t']+count['T']);
      |        ^~~~~~~~~~
main.c:34:19: error: unknown type name 'count'
   34 | printf("t : %d\n",count['t']+count['T']);
      |                   ^~~~~
main.c:35:8: error: expected declaration specifiers or '...' before string constant
   35 | printf("u : %d\n",count['u']+count['U']);
      |        ^~~~~~~~~~
main.c:35:19: error: unknown type name 'count'
   35 | printf("u : %d\n",count['u']+count['U']);
      |                   ^~~~~
main.c:36:8: error: expected declaration specifiers or '...' before string constant
   36 | printf("v : %d\n",count['v']+count['V']);
      |        ^~~~~~~~~~
main.c:36:19: error: unknown type name 'count'
   36 | printf("v : %d\n",count['v']+count['V']);
      |                   ^~~~~
main.c:37:8: error: expected declaration specifiers or '...' before string constant
   37 | printf("w : %d\n",count['w']+count['W']);
      |        ^~~~~~~~~~
main.c:37:19: error: unknown type name 'count'
   37 | printf("w : %d\n",count['w']+count['W']);
      |                   ^~~~~
main.c:38:8: error: expected declaration specifiers or '...' before string constant
   38 | printf("x : %d\n",count['x']+count['X']);
      |        ^~~~~~~~~~
main.c:38:19: error: unknown type name 'count'
   38 | printf("x : %d\n",count['x']+count['X']);
      |                   ^~~~~
main.c:39:8: error: expected declaration specifiers or '...' before string constant
   39 | printf("y : %d\n",count['y']+count['Y']);
      |        ^~~~~~~~~~
main.c:39:19: error: unknown type name 'count'
   39 | printf("y : %d\n",count['y']+count['Y']);
      |                   ^~~~~
main.c:40:8: error: expected declaration specifiers or '...' before string constant
   40 | printf("z : %d\n",count['z']+count['Z']);
      |        ^~~~~~~~~~
main.c:40:19: error: unknown type name 'count'
   40 | printf("z : %d\n",count['z']+count['Z']);
      |                   ^~~~~
main.c:41:1: error: expected identifier or '(' before 'return'
   41 | return 0;
      | ^~~~~~
main.c:42:1: error: expected identifier or '(' before '}' token
   42 | }
      | ^