Language: C++


// #include<cstdio>

// int main(){
//     int count[26];
// 	for(int i = 0; i < 26; i++){
//         count[i] = 0;
// 	}
// 	char s[1201];
// 	while(fgets(s,1201,stdin) != NULL){
//         for(int i = 0; s[i] != '\0'; i++){
//             for(int j = 0; j < 26; j++){
//                 if(s[i] - 'A' == j || s[i] - 'a' == j){
//                     count[j] = count[j] + 1;
//                 }
//             }
//         }
//         for(int i = 0;i < 26;i++) {
//             printf("%c : %d\n",'a' + i,count[i]);
//         }
//     }

//     return 0;
// }


#include<cstdio>
int main(){
    int i,j,n,count[26]={0};
    char ch;
  while(scanf("%c",&ch)!=EOF){
    if(ch>='a' && ch<='z'){
      count[ch-'a']++;
    }
    else if(ch>='A'&& ch<='Z'){
      count[ch-'A']++;
    } 
  }
  for(j=0;j<26;j++){
  printf("%c : %d\n",j+'a',count[j]);
  }
  return (0);
}


Compiler output:
a.cc:31:1: error: extended character   is not valid in an identifier
   31 |   while(scanf("%c",&ch)!=EOF){
      | ^
a.cc:31:1: error: extended character   is not valid in an identifier
a.cc:32:1: error: extended character   is not valid in an identifier
   32 |     if(ch>='a' && ch<='z'){
      | ^
a.cc:32:1: error: extended character   is not valid in an identifier
a.cc:32:1: error: extended character   is not valid in an identifier
a.cc:32:1: error: extended character   is not valid in an identifier
a.cc:33:1: error: extended character   is not valid in an identifier
   33 |       count[ch-'a']++;
      | ^
a.cc:33:1: error: extended character   is not valid in an identifier
a.cc:33:1: error: extended character   is not valid in an identifier
a.cc:33:1: error: extended character   is not valid in an identifier
a.cc:33:1: error: extended character   is not valid in an identifier
a.cc:33:1: error: extended character   is not valid in an identifier
a.cc:34:1: error: extended character   is not valid in an identifier
   34 |     }
      | ^
a.cc:34:1: error: extended character   is not valid in an identifier
a.cc:34:1: error: extended character   is not valid in an identifier
a.cc:34:1: error: extended character   is not valid in an identifier
a.cc:35:1: error: extended character   is not valid in an identifier
   35 |     else if(ch>='A'&& ch<='Z'){
      | ^
a.cc:35:1: error: extended character   is not valid in an identifier
a.cc:35:1: error: extended character   is not valid in an identifier
a.cc:35:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
   36 |       count[ch-'A']++;
      | ^
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:36:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character   is not valid in an identifier
   37 |     }
      | ^
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:37:1: error: extended character   is not valid in an identifier
a.cc:38:1: error: extended character   is not valid in an identifier
   38 |   }
      | ^
a.cc:38:1: error: extended character   is not valid in an identifier
a.cc:39:1: error: extended character   is not valid in an identifier
   39 |   for(j=0;j<26;j++){
      | ^
a.cc:39:1: error: extended character   is not valid in an identifier
a.cc:40:1: error: extended character   is not valid in an identifier
   40 |   printf("%c : %d\n",j+'a',count[j]);
      | ^
a.cc:40:1: error: extended character   is not valid in an identifier
a.cc:41:1: error: extended character   is not valid in an identifier
   41 |   }
      | ^
a.cc:41:1: error: extended character   is not valid in an identifier
a.cc:42:1: error: extended character   is not valid in an identifier
   42 |   return (0);
      | ^
a.cc:42:1: error: extended character   is not valid in an identifier
a.cc: In function 'int main()':
a.cc:31:1: error: '\U000000a0\U000000a0while' was not declared in this scope
   31 |   while(scanf("%c",&ch)!=EOF){
      | ^~~~~~~
a.cc:39:10: error: expected ')' before ';' token
   39 |   for(j=0;j<26;j++){
      |      ~   ^
      |          )
a.cc:39:19: error: expected ';' before ')' token
   39 |   for(j=0;j<26;j++){
      |                   ^
      |                   ;
a.cc:42:1: error: '\U000000a0\U000000a0return' was not declared in this scope
   42 |   return (0);
      | ^~~~~~~~