criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <stdio.h>
#include <string.h>
int main(){
    int k, i, j, count[30]={0}, n=0;
    char static str[[2000];
    char alpha[26] = "abcdefghijklmnopqrstuvwxyz";
    char alpha1[26] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    fgets(str, 2000, stdin);
    n = strlen(str);
    for(i=0; i<n; i++){
        for(k=0; k<26; k++){
            if(str[i] == alpha[k] || str[i] == alpha1[k]){
                count[k]++;
            }
        }
    }
    for(j=0; j<26; j++){
        printf("%c : %d?\n", alpha[j], count[j]);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:22: error: expected identifier before numeric constant
    5 |     char static str[[2000];
      |                      ^~~~
main.c:5:27: error: expected ']' before ';' token
    5 |     char static str[[2000];
      |                           ^
      |                           ]
main.c:21:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '}' token
   21 | }
      | ^
Language: C

#include <stdio.h>
#include<ctype.h>
#include <string.h>
int main(){
    int k, i, j, count[30]={0}, n=0;
    char static str[[2000];
    char alpha[26] = "abcdefghijklmnopqrstuvwxyz";
    char alpha1[26] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    fgets(str, 2000, stdin);
    n = strlen(str);
    for(i=0; i<n; i++){
        for(k=0; k<26; k++){
            if(str[i] == alpha[k] || str[i] == alpha1[k]){
                count[k]++;
            }
        }
    }
    for(j=0; j<26; j++){
        printf("%c : %d?\n", alpha[j], count[j]);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:22: error: expected identifier before numeric constant
    6 |     char static str[[2000];
      |                      ^~~~
main.c:6:27: error: expected ']' before ';' token
    6 |     char static str[[2000];
      |                           ^
      |                           ]
main.c:22:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '}' token
   22 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
	char a;
	int abc[27],b;
	for(b=0;b<26;b++){
		abc[b]=0;
	}
	do{
		scanf("%c",&a);
		if(a>='a' && a<='z'){
			abc[a-'a']++;
		}else{
			if(a>='A' && a<='Z'){
				abc[a-'A']++;
			}
		}else{
			if(a==' '){
				a=26;
			}
		}else{
			if(a=='\n'){
				a=26;
			}
		}
				
		abc[a]++;
	}while(a);
		for(b=0;b<=26;b++){
			printf("%c : %d\n",b+'a',abc[b]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:18: error: 'else' without a previous 'if'
   17 |                 }else{
      |                  ^~~~
main.c:21:18: error: 'else' without a previous 'if'
   21 |                 }else{
      |                  ^~~~
Language: C

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

int main (void){
	int n,i=0,k,j;
	char c[1250],b[1250],a='a';
	while(i=0;i<1210;i++){
		scanf("%c",&c[i]);
	}
	n=strlen(c);
	for(i=0;i<n;i++){
		c[i]=tolower(c[i]);
	}
	for(i=1;i<=26;i++){
		k=0;
		for(j=0;j<n;j++){
			if((a+i-1)==c[j]){
				k++;
			}
		}
		printf("%c : %d\n",a+i-1,k);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:18: error: expected ')' before ';' token
    7 |         while(i=0;i<1210;i++){
      |              ~   ^
      |                  )
main.c:12:22: error: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
   12 |                 c[i]=tolower(c[i]);
      |                      ^~~~~~~
main.c:3:1: note: include '<ctype.h>' or provide a declaration of 'tolower'
    2 | #include<string.h>
  +++ |+#include <ctype.h>
    3 |
Language: C

int main(void)
{
	char a[] = "abcdefghijklmnopqrstuvwxyz";
	int i, cnt[26] = { 0 };
	char ch;

	while (scanf("%c", &ch)!=EOF)
		for (i = 0; i < 26; i++)
			if (tolower(ch) == a[i])	cnt[i]++;

	for (i = 0; i < 26; i++)
		printf("%c???%d\n", a[i], cnt[i]);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |         while (scanf("%c", &ch)!=EOF)
      |                ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:7:16: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |         while (scanf("%c", &ch)!=EOF)
      |                ^~~~~
main.c:7:16: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:34: error: 'EOF' undeclared (first use in this function)
    7 |         while (scanf("%c", &ch)!=EOF)
      |                                  ^~~
main.c:7:34: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:7:34: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:29: error: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
    9 |                         if (tolower(ch) == a[i])        cnt[i]++;
      |                             ^~~~~~~
main.c:1:1: note: include '<ctype.h>' or provide a declaration of 'tolower'
  +++ |+#include <ctype.h>
    1 | int main(void)
main.c:12:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 |                 printf("%c???%d\n", a[i], cnt[i]);
      |                 ^~~~~~
main.c:12:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

int main(void)
{
	char c[1200];
	int i,j,s,k,out[26];
	for(i=0;i<26;i++) out[i]=0;
		

		fgets(c,sizeof(c),stdin);		
		for(i=0;i<strlen(c);i++){
			for(j='a',k='A',s=0;j<='z';j++,k++,s++){
				if(j==c[i] || k==c[i]) out[s]+=1;
			}
		}
		for(i='a',j=0;j<26;i++,j++)	printf("%c : %d\n",i,out[j]);
	

return 0;
}#include <stdio.h>
#include <string.h>

int main(void)
{
	char c[1200];
	int i,j,s,k,out[26];
	for(i=0;i<26;i++) out[i]=0;
		
	while(1){
		fgets(c,sizeof(c),stdin);

		
		for(i=0;i<strlen(c);i++){
			for(j='a',k='A',s=0;j<='z';j++,k++,s++){
				if(j==c[i] || k==c[i]) out[s]+=1;
			}
		}
		for(i='a',j=0;j<26;i++,j++)	printf("%c : %d\n",i,out[j]);
	}

return 0;
}

Compiler output:
main.c:21:2: error: stray '#' in program
   21 | }#include <stdio.h>
      |  ^
main.c:21:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   21 | }#include <stdio.h>
      |           ^
Language: C

#include <stdio.h>
int main(void)
{
	int i,count[26];
	char ch[1200];
	scanf("%s",ch);
	while(num[i] != '\0'){
		for(i=0;i<26;i++){
			if(ch[i]=='A'+1 || ch[i]=='a'+1){
				count[i]++;
			}
	}
	for(i=0;i<26;i++){
		printf("%c : %d\n",'a'+i,count[i]);
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:15: error: 'num' undeclared (first use in this function)
    7 |         while(num[i] != '\0'){
      |               ^~~
main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:1: error: expected declaration or statement at end of input
   17 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
{
	int i,count[26];
	char ch[1200];
	scanf("%s",ch);
	while(ch[i] != '\0'){
		for(i=0;i<26;i++){
			if(ch[i]=='A'+1 || ch[i]=='a'+1){
				count[i]++;
			}
	}
	for(i=0;i<26;i++){
		printf("%c : %d\n",'a'+i,count[i]);
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:1: error: expected declaration or statement at end of input
   17 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
{
	int i,count[26];
	char ch;
	while(1){
		scanf("%c",&ch)
		if(ch=='\0') break;
		for(i=0;i<26;i++){
			if(ch-'A'==i || ch-'a'==i){
				count[i]++;
			}
		}
	}
	for(i=0;i<26;i++){
		printf("%c : %d\n",'a'+i,count[i]);
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:32: error: expected ';' before 'if'
    7 |                 scanf("%c",&ch)
      |                                ^
      |                                ;
    8 |                 if(ch=='\0') break;
      |                 ~~
Language: C

#include <stdio.h>
#include <ctype.h>
int main(void)
{
	int i,count[26],num;
	char ch;
	while(scanf("%c",&ch) != EOF){
		else if(isupper(ch))
			num=ch-'A';
		else if(islower(ch))
			num=ch-'a';
		count[num]++;
	}
	for(i=0;i<26;i++){
		printf("%c : %d\n",'a'+i,count[i]);
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: 'else' without a previous 'if'
    8 |                 else if(isupper(ch))
      |                 ^~~~
Language: C

#include <stdio.h>
#define ALPHA 26

int main(void){
        char s[1200];
        int cou[ALPHA]={0},i=0;
        gets(s)
        while(s[i]){
                if(s[i]>='a' && s[i]<='z')
                        cou[s[i]-'a']++;
                else if(s[i]>='A'&&s[i]<='Z')
                        cou[s[i]-'A']++;
                i++;
        }
        for(i=0;i<ALPHA;i++)
                printf("%c:%d\n",'a'+i,cou[i]);
        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |         gets(s)
      |         ^~~~
      |         fgets
main.c:7:16: error: expected ';' before 'while'
    7 |         gets(s)
      |                ^
      |                ;
    8 |         while(s[i]){
      |         ~~~~~
Language: C

#include <stdio.h>

int main(void)
{
  char s[1200];
  int cnt[26] = {0};
  int i;

  fgets(s, 1200,stdin);
         
  len=strlen(str);
       
  for(i = 0; i < 1200; i++)
    if(s[i] >= 'a' && s[i] <= 'z')
      cnt[s[i] - 'a']++;
    else if(s[i] >= 'A' && s[i] <= 'Z')
      cnt[s[i] ^ 'A']++;
 

  for(i = 0; i < 26; i++)
    printf("%c : %d\n", 'a' + i, cnt[i]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:3: error: 'len' undeclared (first use in this function)
   11 |   len=strlen(str);
      |   ^~~
main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:7: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
   11 |   len=strlen(str);
      |       ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:11:7: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   11 |   len=strlen(str);
      |       ^~~~~~
main.c:11:7: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:11:14: error: 'str' undeclared (first use in this function)
   11 |   len=strlen(str);
      |              ^~~
Language: C

#include <stdio.h>

int main(void)
{
  char s[1200];
  int cnt[26] = {0};
  int len = 0;
  int i;

  fgets(s, 1200,stdin);
         
  len = strlen(str);
       
  for(i = 0; i < 1200; i++)
    if(s[i] >= 'a' && s[i] <= 'z')
      cnt[s[i] - 'a']++;
    else if(s[i] >= 'A' && s[i] <= 'Z')
      cnt[s[i] ^ 'A']++;
 

  for(i = 0; i < 26; i++)
    printf("%c : %d\n", 'a' + i, cnt[i]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
   12 |   len = strlen(str);
      |         ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:12:9: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   12 |   len = strlen(str);
      |         ^~~~~~
main.c:12:9: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:12:16: error: 'str' undeclared (first use in this function)
   12 |   len = strlen(str);
      |                ^~~
main.c:12:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(void)
{
  char s[1200];
  int cnt[26] = {0};
  int len = 0;
  int i;

  while(!){
    if(fgets(s, sizeof s,stdin) == NULL)
      break;
         
  len = strlen(s);
       
  for(i = 0; i < len; i++)
    if(s[i] >= 'a' && s[i] <= 'z')
      cnt[s[i] - 'a']++;
    else if(s[i] >= 'A' && s[i] <= 'Z')
      cnt[s[i] - 'A']++;
  }

  for(i = 0; i < 26; i++)
    printf("%c : %d\n", 'a' + i, cnt[i]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:10: error: expected expression before ')' token
   11 |   while(!){
      |          ^
Language: C

#include<stdio.h>
#include<ctype.h>
int main(){
  int i,x;
  int count[26]={0};
  char c;
  while(1){
    scanf("%c",&c);
    if(c=='\n') break;
    tolower(c);
    x=c-'a';
    count[x]=count[x]+1;
    }
  for(i=0;i<26;i++){
    printf("%c : %d\n",a+i,count[i]);}
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:15:24: error: 'a' undeclared (first use in this function)
   15 |     printf("%c : %d\n",a+i,count[i]);}
      |                        ^
main.c:15:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main()
{
int count=0,i=0;
 char str[1200];
 char array[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 int count[26]={0};

while(1){
        scanf("%s",&str); 
        if(str[0]=='\n')
             break;
        for(i=0;str[i]!='\0';i++)
        {
         for(int j=0;j<26;j++)
         {
          if(str[i]==array[j])
              array[j]++;
         }
        }
        }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:6: error: conflicting types for 'count'; have 'int[26]'
    8 |  int count[26]={0};
      |      ^~~~~
main.c:5:5: note: previous definition of 'count' with type 'int'
    5 | int count=0,i=0;
      |     ^~~~~
Language: C

#include <stdio.h>

int main()
{
int count=0,i,j;
 char str[1200];
 char array[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 int count[26]={0};

while(1){
        scanf("%s",&str); 
        if(str[0]=='\n')
             break;
        for(i=0;str[i]!='\0';i++)
        {
         for(int j=0;j<26;j++)
         {
          if(str[i]==array[j])
              array[j]++;
         }
        }
        }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:6: error: conflicting types for 'count'; have 'int[26]'
    8 |  int count[26]={0};
      |      ^~~~~
main.c:5:5: note: previous definition of 'count' with type 'int'
    5 | int count=0,i,j;
      |     ^~~~~
Language: C

#include <stdio.h>

int main()
{
int count=0,i,j;
 char str[1200];
 char array[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 int count[26]={0};

while(1){
        scanf("%s",&str); 
        if(str[0]=='\n')
             break;
        for(i=0;str[i]!='\0';i++)
        {
         for(int j=0;j<26;j++)
         {
          if(str[i]==array[j])
              count[j]++;
         }
        }
        }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:6: error: conflicting types for 'count'; have 'int[26]'
    8 |  int count[26]={0};
      |      ^~~~~
main.c:5:5: note: previous definition of 'count' with type 'int'
    5 | int count=0,i,j;
      |     ^~~~~
Language: C

#include <stdio.h>

int main()
{
int count=0,i,j;
 char str[1200];
 char array[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 int count[26];

while(1){
        scanf("%s",&str); 
        if(str[0]=='\n')
             break;
        for(i=0;str[i]!='\0';i++)
        {
         for(int j=0;j<26;j++)
         {
          if(str[i]==array[j])
              count[j]++;
         }
        }
        }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:6: error: conflicting types for 'count'; have 'int[26]'
    8 |  int count[26];
      |      ^~~~~
main.c:5:5: note: previous definition of 'count' with type 'int'
    5 | int count=0,i,j;
      |     ^~~~~
Language: C

#include <stdio.h>

int main()
{
int count=0,i,j;
 char str[1200];
 char array[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 int count[26];

while(1){
        scanf("%s",&str); 
        if(str[0]=='\n')
             break;
        for(i=0;str[i]!='\0';i++)
        {
         for(int j=0;j<26;j++)
         {
          if(str[i]==array[j])
              count[j]++;
         }
        }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:6: error: conflicting types for 'count'; have 'int[26]'
    8 |  int count[26];
      |      ^~~~~
main.c:5:5: note: previous definition of 'count' with type 'int'
    5 | int count=0,i,j;
      |     ^~~~~
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#include <stdio.h>

int main()
{
int count=0,i,j;
 char str[1200];
 char array[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 int count[26];

while(1){
        scanf("%s",&str); 
        if(str[0]=='\n')
             break;
        for(i=0;str[i]!='\0';i++)
        {
         for(j=0;j<26;j++)
         {
          if(str[i]==array[j])
              count[j]++;
         }
        }
for(j=0;j<26;j++)
         {
          printf("%d",count[j]);
         }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:6: error: conflicting types for 'count'; have 'int[26]'
    8 |  int count[26];
      |      ^~~~~
main.c:5:5: note: previous definition of 'count' with type 'int'
    5 | int count=0,i,j;
      |     ^~~~~
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C

#include<stdio.h>
#include<ctype.h>

int main(void){

char str;
int char_count[26];
int i;
//for(i=0;i<1205;i++)str[i]='\n';
for(i=0;i<26;i++)char_count[i]=0;
while ( scanf("%c", &str) != EOF ){
	if(isupper(str)){str=tolower(str);}
	if(isalpha(str)){
		char_count[str-'a']++;
	    }
}printf("\n")
for(i=0;i<26;i++){
	printf("%c:%d\n",'a'+i,char_count[i]);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:14: error: expected ';' before 'for'
   16 | }printf("\n")
      |              ^
      |              ;
   17 | for(i=0;i<26;i++){
      | ~~~
Language: C

#include <stdio.h>

int main()
{
int count=0,i=0;
 char str[1200];
 char array[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};

while(1){
        scanf("%s",&str); 
        if(str[0]=='0')
             break;
        sum=0;
        for(i=0;str[i]!='\0';i++){
         sum=sum+(str[i]-'0'); 
         }
         printf("%d\n",sum);
        }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: 'sum' undeclared (first use in this function)
   13 |         sum=0;
      |         ^~~
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void)
{
	char count[26];
	int i;

	for(i=0;i<26;i++){
		count[i]=0;
	}
	do{

	 i=getchar();	/*?????????????????????*/
	 if(i>='A'&&i<='Z'){
		count[i-'A']++;
		}
	 else if(i>='a'&&i<='z'){
		count[i-'a']++;
		}
	 else if(i>=0x81 && i<=0xa0)||(i>=0xe0 && i<=0xfd){
		getchar();
		}
	while(i!=EOF);
	for(i=0;i<26;i++){
		printf("%c:%5d\t",'A'+i,count[i]);/**/
		}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:37: error: expected expression before '||' token
   20 |          else if(i>=0x81 && i<=0xa0)||(i>=0xe0 && i<=0xfd){
      |                                     ^~
main.c:29:1: error: expected 'while' at end of input
   29 | }
      | ^
main.c:29:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>

int main(void)
{
	char count[26];
	int i;

	for(i=0;i<26;i++){
		count[i]=0;
	}
	do{

	 i=getchar();	/*?????????????????????*/
	 if(i>='A'&&i<='Z'){
		count[i-'A']++;
		}
	 else if(i>='a'&&i<='z'){
		count[i-'a']++;
		}
	 else if((i>=0x81 && i<=0xa0)||(i>=0xe0 && i<=0xfd)){
		getchar();
		}
	while(i!=EOF);
	for(i=0;i<26;i++){
		printf("%c:%5d\t",'A'+i,count[i]);/**/
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:9: error: expected 'while' before 'return'
   28 |         return 0;
      |         ^~~~~~
Language: C

#include <stdio.h>
#include <ctype.h>
#include <conio.h>
#include <stdlib.h>   
 

int main()
{
int count=0,i,j;
 char str[1200];
 char array[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 int dem[26]={0};
while(1){
        scanf("%s",&str); 
        if (str[0]=='0')break;
        for (i = 0; i < 26; i++)
		{
			for(j=0;str[j]!='\0';j++){
				if(array[i]==str[j])
				{
					dem[i]=dem[i] +1;
				}
			}
			printf("%c:%d\n",array[i],dem[i]);
         }
        }
 getch();
 return 0;
}

Compiler output:
main.c:3:10: fatal error: conio.h: No such file or directory
    3 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C

int count=0,i=0,j;
 char str[1200];
 char array[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 int dem[26]={0};
 char c;
while(1){
        scanf("%c",&c); 
        if (c==EOF)break;
		for(int i=0;i<26;i++)
		{
			if(isupper(c))
				str[j]=tolower(c);
			else
				str[j]=c;
			if(array[i]==str[j])
				dem[i]=dem[i] +1;
		}
		j++;	
}
for (i = 0; i < 26; i++)
{	
	printf("%c:%d\n",array[i],dem[i]);
}
 getch();
 return 0;
}

Compiler output:
main.c:6:1: error: expected identifier or '(' before 'while'
    6 | while(1){
      | ^~~~~
main.c:20:1: error: expected identifier or '(' before 'for'
   20 | for (i = 0; i < 26; i++)
      | ^~~
main.c:20:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   20 | for (i = 0; i < 26; i++)
      |               ^
main.c:20:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   20 | for (i = 0; i < 26; i++)
      |                      ^~
main.c:24:2: warning: data definition has no type or storage class
   24 |  getch();
      |  ^~~~~
main.c:24:2: error: type defaults to 'int' in declaration of 'getch' [-Wimplicit-int]
main.c:25:2: error: expected identifier or '(' before 'return'
   25 |  return 0;
      |  ^~~~~~
main.c:26:1: error: expected identifier or '(' before '}' token
   26 | }
      | ^
Language: C

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>   
#include <conio.h>   
 
int main()
{int count=0,i=0,j;
 char str[1200];
 char array[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 int dem[26]={0};
 char c;
while(1){
        scanf("%c",&c); 
        if (c==EOF)break;
		for(int i=0;i<26;i++)
		{
			if(isupper(c))
				str[j]=tolower(c);
			else
				str[j]=c;
			if(array[i]==str[j])
				dem[i]=dem[i] +1;
		}
		j++;	
}
for (i = 0; i < 26; i++)
{	
	printf("%c:%d\n",array[i],dem[i]);
}
 getch();
 return 0;
}

Compiler output:
main.c:4:10: fatal error: conio.h: No such file or directory
    4 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <ctype.h>

int main()
{int count=0,i=0,j=0;
 char str[1200];
 int dem[26]={0};
 char c;
while(scanf("%c",&c)!=EOF){
 c=tolower(c);
 if ('a' <= ch && ch <= 'z') dem[c - 'a']++;
}
for (i = 0; i < 26; i++)
{	
	printf("%c:%d\n",array[i],dem[i]);
}
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:13: error: 'ch' undeclared (first use in this function); did you mean 'c'?
   11 |  if ('a' <= ch && ch <= 'z') dem[c - 'a']++;
      |             ^~
      |             c
main.c:11:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:26: error: 'array' undeclared (first use in this function)
   15 |         printf("%c:%d\n",array[i],dem[i]);
      |                          ^~~~~
Language: C

#include <stdio.h>
#include <ctype.h>

int main()
{int count=0,i=0,j=0;
 char str[1200];
 int dem[26]={0};
 char c;
while(scanf("%c",&c)!=EOF){
 c=tolower(c);
 if ('a' <= c && c <= 'z') dem[c - 'a']++;
}
for (i = 0; i < 26; i++)
{	
	printf("%c:%d\n",array[i],dem[i]);
}
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:26: error: 'array' undeclared (first use in this function)
   15 |         printf("%c:%d\n",array[i],dem[i]);
      |                          ^~~~~
main.c:15:26: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <ctype.h>

int main()
{int count=0,i=0,j=0;
 char str[1200];
 int dem[26]={0};
 char c;
while(scanf("%c",&c)!=EOF){
 c=tolower(c);
 if ('a' <= c && c <= 'z') dem[c - 'a']++;
}
    for (i = 0; i < 26; i++)
        printf("%c : %d\n", 'a' + i, count[i]);
     
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:43: error: subscripted value is neither array nor pointer nor vector
   14 |         printf("%c : %d\n", 'a' + i, count[i]);
      |                                           ^
Language: C

#include <stdio.h>
#include <ctype.h>

int main()
{int count=0,i=0,j=0;
 char str[1200];
 int dem[26]={0};
 char c;
while(scanf("%c",&c)!=EOF){
  c = tolower(c);
  if ('a' <= c && c <= 'z') dem[c - 'a']++;
}
for (i = 0; i < 26; i++)
    printf("%c : %d\n", 'a' + i, count[i]);
     
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:39: error: subscripted value is neither array nor pointer nor vector
   14 |     printf("%c : %d\n", 'a' + i, count[i]);
      |                                       ^
Language: C

#include <stdio.h>
#include <ctype.h>

int main()
{int count=0,i=0,j=0;
 char str[1200];
 int dem[26]={};
 char c;
while(scanf("%c",&c)!=EOF){
  c = tolower(c);
  if ('a' <= c && c <= 'z') dem[c - 'a']++;
}
for (i = 0; i < 26; i++)
    printf("%c : %d\n", 'a' + i, count[i]);
     
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:39: error: subscripted value is neither array nor pointer nor vector
   14 |     printf("%c : %d\n", 'a' + i, count[i]);
      |                                       ^
Language: C

#include <stdio.h>
#include <ctype.h>

int main()
{int count=0;
 char str[1200];
 int dem[26]={};
 char c;
while(scanf("%c",&c)!=EOF){
  c = tolower(c);
  if ('a' <= c && c <= 'z') dem[c - 'a']++;
}
for (i = 0; i < 26; i++)
    printf("%c : %d\n", 'a' + i, count[i]);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:6: error: 'i' undeclared (first use in this function)
   13 | for (i = 0; i < 26; i++)
      |      ^
main.c:13:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <ctype.h>

int main()
{int count=0;
 char str[1200];
 int i,dem[26]={};
 char c;
while(scanf("%c",&c)!=EOF){
  c = tolower(c);
  if ('a' <= c && c <= 'z') dem[c - 'a']++;
}
for (i = 0; i < 26; i++)
    printf("%c : %d\n", 'a' + i, count[i]);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:39: error: subscripted value is neither array nor pointer nor vector
   14 |     printf("%c : %d\n", 'a' + i, count[i]);
      |                                       ^
Language: C

#include <stdio.h>
#include <ctype.h>

int main()
{
 int i,dem[26]={};
 char c;
while(scanf("%c",&c)!=EOF){
  c = tolower(c);
  if ('a' <= c && c <= 'z') dem[c - 'a']++;
}
for (i = 0; i < 26; i++)
    printf("%c : %d\n", 'a' + i, count[i]);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:34: error: 'count' undeclared (first use in this function)
   13 |     printf("%c : %d\n", 'a' + i, count[i]);
      |                                  ^~~~~
main.c:13:34: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <ctype.h>

int main()
{
 int i,dem[26]={};
  char array[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 char c;
while(scanf("%c",&c)!=EOF){
  c = tolower(c);
 for(i=0;i<26;i++)
{if (c==a[i]) dem[c - 'a']++;}
}
for (i = 0; i < 26; i++)
    printf("%c : %d\n", 'a' + i, dem[i]);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: 'a' undeclared (first use in this function)
   12 | {if (c==a[i]) dem[c - 'a']++;}
      |         ^
main.c:12:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <ctype.h>

int main()
{
 int i,dem[26]={};
  char array[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
 char c;
while(scanf("%c",&c)!=EOF){
  c = tolower(c);
 for(i=0;i<26;i++)
 {if (c==a[i]) dem[i]++;}
}
for (i = 0; i < 26; i++)
    printf("%c : %d\n", 'a' + i, dem[i]);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:10: error: 'a' undeclared (first use in this function)
   12 |  {if (c==a[i]) dem[i]++;}
      |          ^
main.c:12:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void)
{
	char count[26]={0};
	int i;
	char c;

	while(scanf("%c",&c)!=EOF){
		if('a' <= c && c <= 'z'){
			count[c-'a']++;
		}
		if('A' <= str && str <= 'Z'){
			c+= 'a'-'A';	
		}
		for(i=0;i<26;i++)
		printf("%c : %d\n",i+'a',count[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:27: error: 'str' undeclared (first use in this function)
   13 |                 if('A' <= str && str <= 'Z'){
      |                           ^~~
main.c:13:27: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void)
{
	char count[52]={0};
	int i=0;;
	char c;

	while(scanf("%c",&c) != EOF){
		if('a' <= c && c <= 'z'){
			count[c-'a'] ++;
		}
		if('A' <= c && c <= 'Z'){
			count[c-'A'] ++;	
		}
		for(i=0;i<26;i++){
		printf("%c : %d\n",i+'a',count[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
int main(void){
    int i,n;
    char az[27];
    int count[26] = {};
    char s;
    for(i=0;i<26;i++){
        az[i] = 'a' + i;
    }
    az[26] = '\0';
    while((scanf("%c",s)) != EOF){
        s = tolower(s);
        n = s - 'a';
        count[n]++;
    }
    for(i = 0;i<26;i++){
        printf("%c : %d\n",az[i],count[i]);
    }

Compiler output:
main.c: In function 'main':
main.c:21:5: error: expected declaration or statement at end of input
   21 |     }
      |     ^
Language: C

#include <cstdio>
#include <cctype>
using namespace std;
 
int main() {
    char c;
    int num[26] = {0};
    while(scanf("%c", &c) != EOF){
        if(isalpha(c)){
            c = tolower(c);
            ++num[c - 'a'];
        }
    }
    for(int i = 0; i < 26; ++i){
        printf("%c : %d\n", 'a' + i, num[i]);
    }
    return 0;
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

int main()
{
    int i,count[26] = {0};
    char ch;
     
    while(scanf("%c",&ch) != EOF){
        for(i = 0;i < 26;i++){
            if(ch == 'a' + i || ch == 'A' + i){
                count[i]++;
            }
        }
    }
     
    for(i = 0;i < 26;i++){
        printf("%c : %d\n",'a' + i,count[i]);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |     while(scanf("%c",&ch) != EOF){
      |           ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:6:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |     while(scanf("%c",&ch) != EOF){
      |           ^~~~~
main.c:6:11: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:30: error: 'EOF' undeclared (first use in this function)
    6 |     while(scanf("%c",&ch) != EOF){
      |                              ^~~
main.c:6:30: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:6:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   15 |         printf("%c : %d\n",'a' + i,count[i]);
      |         ^~~~~~
main.c:15:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:15:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>


int main()
{
	char ch,c;
	int num,i;
	int cnt[26];
	
	for(i = 0; i < 26; i++) cnt[i] = 0;
	
	while(scanf("%c",&ch) != EOF)
	{
		if(ch >= 'A') mun = ch - 'A';
		else num = ch - 'a';
		cnt[num]++;
	}
	
	for(i = 0; i < 26; i++)
	{
		c = 'a' + i;
		printf("%c:%d",c,cnt[i]);
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:31: error: 'mun' undeclared (first use in this function)
   14 |                 if(ch >= 'A') mun = ch - 'A';
      |                               ^~~
main.c:14:31: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(void){
????????char y,g[3000]={'\0'};
????????int a[26]={0},i=0,k;
????????while((y=getchar())!=EOF){
????????????????y=tolower(y);
????????????????for(k=0;k<26;k++){
????????????????????????if(y=='a'+k){
????????????????????????????????a[k]++;
????????????????????????}
????????????????}
????????}
????????for(k=0;k<26;k++){
????????????????printf("%c : %d\n",'a'+k,a[k]);
????????}
????????return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: expected expression before '?' token
    6 | ????????char y,g[3000]={'\0'};
      | ^
main.c:7:1: error: expected expression before '?' token
    7 | ????????int a[26]={0},i=0,k;
      | ^
main.c:8:1: error: expected expression before '?' token
    8 | ????????while((y=getchar())!=EOF){
      | ^
Language: C

#include<iostream>
#include<conio.h>
using namespace std;

int main(void) {
	char roop[27];
	char moji[1500];
	int count[27] = {};
	cin.getline(moji, sizeof(moji));
	for (int i = 0; i <= 1500; i++) {
		for (int t = 0; t <= 25; t++) {
			if ((moji[i] == 65+t) || (moji[i] == 97+t)) {
				count[t]++;
				break;
			}
		}
	}
	for (int i = 0; i <= 25; i++) {
		roop[i] = 97 + i;
		cout << roop[i] << " " << ":" << " " << count[i] << "\n";
	}
	return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(void){
	char a,c;
	int i;
	scanf("%s",&a);

	for(i=0;i<26;i++){
		c[i]=0;
	}
	for(i=0;i<1201;i++){
		if(a[i]=='\0') break;
		if(a[i]>='A' && a[i]<='Z'){
			a[i]=a[i]+('a'-'A');
		}
		if(a[i]>='a' && a[i]<='z'){
			c[a[i]-'a']++;
		}
	}
	for(i=0;i<26;i++){
		printf("%c : %d\n",'a'+i,c[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:18: error: subscripted value is neither array nor pointer nor vector
    9 |                 c[i]=0;
      |                  ^
main.c:12:21: error: subscripted value is neither array nor pointer nor vector
   12 |                 if(a[i]=='\0') break;
      |                     ^
main.c:13:21: error: subscripted value is neither array nor pointer nor vector
   13 |                 if(a[i]>='A' && a[i]<='Z'){
      |                     ^
main.c:13:34: error: subscripted value is neither array nor pointer nor vector
   13 |                 if(a[i]>='A' && a[i]<='Z'){
      |                                  ^
main.c:14:26: error: subscripted value is neither array nor pointer nor vector
   14 |                         a[i]=a[i]+('a'-'A');
      |                          ^
main.c:14:31: error: subscripted value is neither array nor pointer nor vector
   14 |                         a[i]=a[i]+('a'-'A');
      |                               ^
main.c:16:21: error: subscripted value is neither array nor pointer nor vector
   16 |                 if(a[i]>='a' && a[i]<='z'){
      |                     ^
main.c:16:34: error: subscripted value is neither array nor pointer nor vector
   16 |                 if(a[i]>='a' && a[i]<='z'){
      |                                  ^
main.c:17:28: error: subscripted value is neither array nor pointer nor vector
   17 |                         c[a[i]-'a']++;
      |                            ^
main.c:21:43: error: subscripted value is neither array nor pointer nor vector
   21 |                 printf("%c : %d\n",'a'+i,c[i]);
      |                                           ^
Language: C

#include <stdio.h>

int main(void)
{
	char str[1200];
	int a = 0;
	int b[26];
	char d;
	
	for(int c = 0; c < 26; c++){
		b[c] = 0;
	}
	
	gets(str);
	
	for(d = 'a'; d <= 'z'; d++){
		while(str[a] != '\0'){
			if(str[a] == d || str[a] == (d - 0x20)){
				b[d - 'a']++;
			}
			a++;
		}
		a = 0;
	}
	
	
	for(d = 'a'; d <= 'z'; d++){
     	printf("%c : %d\n", d, b[d - 'a']);
	}
	
	return (0);
}
		
	
	

Compiler output:
main.c: In function 'main':
main.c:14:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   14 |         gets(str);
      |         ^~~~
      |         fgets
Language: C

main(X[128]){
????????char c;
????????for(;~(scanf("%c ",&c));X[c]++);
????????for(c=97;c<123;c++)printf("%c : %d\n",c,X[c]+X[c-32]);
}

Compiler output:
main.c:1:6: error: unknown type name 'X'
    1 | main(X[128]){
      |      ^
Language: C

X[128];
main(){
????????char c;
????????for(;~(scanf("%c ",&c));X[c]++);
????????for(c=97;c<123;c++)printf("%c : %d\n",c,X[c]+X[c-32]);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | X[128];
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'X' [-Wimplicit-int]
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:1: error: expected expression before '?' token
    3 | ????????char c;
      | ^
main.c:4:1: error: expected expression before '?' token
    4 | ????????for(;~(scanf("%c ",&c));X[c]++);
      | ^
main.c:5:1: error: expected expression before '?' token
    5 | ????????for(c=97;c<123;c++)printf("%c : %d\n",c,X[c]+X[c-32]);
      | ^
Language: C

main(){
    int X[128]={0};
????????char c;
????????for(;~(scanf("%c ",&c));X[c]++);
????????for(c=97;c<123;c++)printf("%c : %d\n",c,X[c]+X[c-32]);
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:1: error: expected expression before '?' token
    3 | ????????char c;
      | ^
main.c:4:1: error: expected expression before '?' token
    4 | ????????for(;~(scanf("%c ",&c));X[c]++);
      | ^
main.c:5:1: error: expected expression before '?' token
    5 | ????????for(c=97;c<123;c++)printf("%c : %d\n",c,X[c]+X[c-32]);
      | ^
Language: C

#include<stdio.h>
int main(){
  int i, count[200];
  int c;
  while((c = getchar()) != EOF){
    for(i=97;i<=122;i++){
      if(c = i){
        count[i]++;
      }
    }
  }
  for(i=97;i<=122;i++){
    printf("%c : %d\n",???i, count[1]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:24: error: expected expression before '?' token
   13 |     printf("%c : %d\n",???i, count[1]);
      |                        ^
Language: C

#include <stdio.h>

int main(void){
    int i, ch;
    int cnt['z' - 'a'] {0};

    while((ch = getchar()) != EOF){
        if(ch >= 'a' && ch <= 'z')
            cnt[ch - 'a']++;
        if(ch >= 'A' && ch <= 'Z')
            cnt[ch - 'A']++;
    }
    for(i = 0; i < 'z' - 'a'; i++){
        printf("%c : %d\n", 'a' + i, cnt[i]);
    }
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    5 |     int cnt['z' - 'a'] {0};
      |                        ^
main.c:5:26: error: expected ';' before '}' token
    5 |     int cnt['z' - 'a'] {0};
      |                          ^
      |                          ;
main.c:9:13: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
    9 |             cnt[ch - 'a']++;
      |             ^~~
      |             int
main.c:9:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
     int i = 0, ch;
     int cnt['z' - 'a'] = {0};

     scanf("%s", s);
     while(s[i]){
         if(s[i] >= 'a' && s[i] <= 'z')
             cnt[s[i] - 'a']++;
         if(s[i] >= 'A' && s[i] <= 'Z')
             cnt[s[i] - 'A']++;
         i++;
     }
     for(i = 0; i < 'z' - 'a'; i++){
         printf("%c : %d\n", 'a' + i, cnt[i]);
     }
     return 0;
}



Compiler output:
main.c: In function 'main':
main.c:7:18: error: 's' undeclared (first use in this function)
    7 |      scanf("%s", s);
      |                  ^
main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(void)
{
	char dat[1200];
	int abc[123]={0};
	int i,j;
	
	//scanf("%[^\n]",&dat);
	gets(dat);
	
	for(i=0 ; i<strlen(dat) ; i++){
		if (isalpha(dat[i])) { //
			if (isupper(dat[i])) {
				abc[tolower(dat[i])]++;
			}
			else {
				abc[dat[i]]++;
			}
		}
	}
	for(i='a' ; i<= 'z' ; i++){
		printf("%c : %d\n",i,abc[i]);
	}
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   12 |         gets(dat);
      |         ^~~~
      |         fgets
Language: C

#include<stdio.h>

void scan_sentence(char * str, int length_max);
void count_alphabet(char * str, int * num_check);
void print_result(int * num_check);

int main(){
	char str[1200];
	int num_check[26];
	int i;
	
	for(i = 0;i < 1200;i++){
		str[i] = 0;
	}
	for(i = 0;i < 26;i++){
		num_check[i] = 0;
	}
	
	scan_sentence(str, 1200);
	
	count_alphabet(str, num_check);
	
	print_result(num_check);
	
	return 0;
}

void scan_sentence(char * str, int length_max)
{
	int i;
	for(i = 0;i < length_max;i++){
		scanf("%c", &(str + i));
		if(&(str + i) == EOF){
			break;
		}
	}
}

void count_alphabet(char * str, int * num_check)
{
	int i;
	for(i = 0;&(str + i) != EOF;i++){
		if(((65 <= &(str + i)) && (&(str + i) <= 90)) || ((97 <= &(str + i)) && (&(str + i) <= 122))){
			&(str + i) & 0x1F;
			&(num_check + &(str + i) - 1)++;
		}
	}
}

void print_result(int * num_check)
{
	int i;
	for(i = 0;i < 26;i++){
		printf("%c : %d", (i + 97), &(num_check + i));
	}
}


Compiler output:
main.c: In function 'scan_sentence':
main.c:32:29: error: lvalue required as unary '&' operand
   32 |                 scanf("%c", &(str + i));
      |                             ^
main.c:33:20: error: lvalue required as unary '&' operand
   33 |                 if(&(str + i) == EOF){
      |                    ^
main.c: In function 'count_alphabet':
main.c:42:19: error: lvalue required as unary '&' operand
   42 |         for(i = 0;&(str + i) != EOF;i++){
      |                   ^
main.c:43:28: error: lvalue required as unary '&' operand
   43 |                 if(((65 <= &(str + i)) && (&(str + i) <= 90)) || ((97 <= &(str + i)) && (&(str + i) <= 122))){
      |                            ^
main.c:43:44: error: lvalue required as unary '&' operand
   43 |                 if(((65 <= &(str + i)) && (&(str + i) <= 90)) || ((97 <= &(str + i)) && (&(str + i) <= 122))){
      |                                            ^
main.c:43:74: error: lvalue required as unary '&' operand
   43 |                 if(((65 <= &(str + i)) && (&(str + i) <= 90)) || ((97 <= &(str + i)) && (&(str + i) <= 122))){
      |                                                                          ^
main.c:43:90: error: lvalue required as unary '&' operand
   43 |                 if(((65 <= &(str + i)) && (&(str + i) <= 90)) || ((97 <= &(str + i)) && (&(str + i) <= 122))){
      |                                                                                          ^
main.c:44:25: error: lvalue required as unary '&' operand
   44 |                         &(str + i) & 0x1F;
      |                         ^
main.c:45:39: error: lvalue required as unary '&' operand
   45 |                         &(num_check + &(str + i) - 1)++;
      |                                       ^
main.c: In function 'print_result':
main.c:54:45: error: lvalue required as unary '&' operand
   54 |                 printf("%c : %d", (i + 97), &(num_check + i));
      |                                             ^
Language: C

#include<stdio.h>

void scan_sentence(char * str, int length_max);
void count_alphabet(char * str, int * num_check, int length);
void print_result(int * num_check);

int main(){

	int length;
	char str[1200];
	int num_check[26];
	int i;
	
	for(i = 0;i < 1200;i++){
		str[i] = 0;
	}
	for(i = 0;i < 26;i++){
		num_check[i] = 0;
	}
	
	length = scan_sentence(str, 1200);
	
	count_alphabet(str, num_check, length);
	
	print_result(num_check);
	
	return 0;
}

int scan_sentence(char * str, int length_max)
{
	int count_text = 0;
	int i;

	for(i = 0;i < length_max;i++){
		scanf("%c", str + i);
		if(*(str + i) == EOF){
			break;
		}
		count_test++;
	}

	return count_text;
}

void count_alphabet(char * str, int * num_check, int length)
{
	int i;
	char alphabet;
	for(i = 0;*(str + i) != length;i++){
		if(((65 <= *(str + i)) && (*(str + i) <= 90)) || ((97 <= *(str + i)) && (*(str + i) <= 122))){
			alphabet = *(str + i) & 0x1F;
			*(num_check + (alphabet - 1)) += 1;
		}
	}
}

void print_result(int * num_check)
{
	int i;
	for(i = 0;i < 26;i++){
		printf("%c : %d\n", (i + 97), *(num_check + i));
	}
}


Compiler output:
main.c: In function 'main':
main.c:21:16: error: void value not ignored as it ought to be
   21 |         length = scan_sentence(str, 1200);
      |                ^
main.c: At top level:
main.c:30:5: error: conflicting types for 'scan_sentence'; have 'int(char *, int)'
   30 | int scan_sentence(char * str, int length_max)
      |     ^~~~~~~~~~~~~
main.c:3:6: note: previous declaration of 'scan_sentence' with type 'void(char *, int)'
    3 | void scan_sentence(char * str, int length_max);
      |      ^~~~~~~~~~~~~
main.c: In function 'scan_sentence':
main.c:40:17: error: 'count_test' undeclared (first use in this function); did you mean 'count_text'?
   40 |                 count_test++;
      |                 ^~~~~~~~~~
      |                 count_text
main.c:40:17: note: each undeclared identifier is reported only once for each function it appears in