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

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

int word_convert( int one_word );

int main(void)
{
	char word[101];
	char sentence[101];
	int one_word;
	int pause;
	int word_cou = 0;
	int match_cou = 0;
	int word_len = 0;
	int len_cou;
	int total_match = 0;
	
	while( ( one_word = getchar() )!= '\n' )
	{
		word[word_cou] = word_convert(one_word);

		word_cou++;
	}
		
	word_len = word_cou;

	word_cou = 0;
	
	while( ( pause = getchar() ) != EOF)
	{
		if( pause != ' ' && pause != '\n')
		{
			sentence[word_cou] = word_convert(pause);
			word_cou++;
		}else
		{
			len_cou = 0;

			if( word_cou == word_len )	
			{
				for( len_cou = 0; len_cou < word_len; len_cou++ )
				{
					if( sentence[len_cou] == word[len_cou] )
					{
						match_cou++;
					}else
					{
						break;
					}

					if( match_cou == word_len )
					{
						total_match++;
					}
				}
				match_cou = 0;
			}
			word_cou = 0;
		}
	}
	
	printf( "%d\n", total_match );
	return 0;
}

int word_convert( int one_word )
{
	if( islower( one_word ) )
	{
		return one_word;
	}else
	{
		return tolower( one_word );
	}
}

Compiler output:
main.c: In function 'main':
main.c:18:29: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
   18 |         while( ( one_word = getchar() )!= '\n' )
      |                             ^~~~~~~
main.c:3:1: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
    2 | #include <ctype.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:29:41: error: 'EOF' undeclared (first use in this function)
   29 |         while( ( pause = getchar() ) != EOF)
      |                                         ^~~
main.c:29:41: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:29:41: note: each undeclared identifier is reported only once for each function it appears in
main.c:62:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   62 |         printf( "%d\n", total_match );
      |         ^~~~~~
main.c:62:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:62:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:62:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
#define N 1002
int main() {
	char s[N] = "", x[N]="", tmp[N], str[N] = "", *p1, *p2;
	int i= 0,j,k=1,cnt = 0,xLength, sLength;
	fgets(x, sizeof(x), stdin);
	x[strlen(x) - 1] = '\0';
	while (1) {
		tmp[0] ='\0';
		//fgets(str, sizeof(str), stdin);
		gets_s(str);
		if (strcmp(str,"END_OF_TEXT")==0) break;
		//str[strlen(str) - 1] = '\0';
		
		//strcat(tmp, str);
		strcat(s, tmp);
		
	}
	xLength = strlen(x);
	sLength = strlen(s);
	for (i = 0; i< sLength; i++) s[i]=tolower(s[i]);
	for (i = 0; i<xLength; i++) x[i]=tolower(x[i]);
	printf("*%s", s);
	putchar('\n');
	p1 = s;
	p2 = x;
	

	while (*p1) {
		k = 1;
		if (*p1 == *p2) {
			//printf("*%c\n", *p1);
			for (k = 1; k <= xLength; k++) if (*(p2+k) != *(p1+k)) { 
				//printf("*%d %c %c\n",i, *(p2 + k), *(p1+ k)); 
				break; }
		}
		//printf("*%d %d\n",i+1, k);
		if (k == xLength) { cnt += 1;}
		*(p1++);
		i++;
	}
	/*while (i<=strlen(s)-strlen(x)) {
		j = 0;
		if (s[i] == x[j]) {
			for (k = 1; k <= strlen(x); k++)
				if (x[j + k] != s[i + k]) break;
		}
		if (k == strlen(x)) {
			flg = 1;
			break;
		}
		j++;
		i++;
	}
	*/
	printf("%d\n", cnt);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:17: error: implicit declaration of function 'gets_s' [-Wimplicit-function-declaration]
   16 |                 gets_s(str);
      |                 ^~~~~~
Language: C

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
#define N 1002
int main() {
	char s[N] = "", x[N]="", tmp[N], str[N] = "", *p1, *p2;
	int i= 0,j,k=1,cnt = 0,xLength, sLength;
	fgets(x, sizeof(x), stdin);
	x[strlen(x) - 1] = '\0';
	while (1) {
		tmp[0] ='\0';
		//fgets(str, sizeof(str), stdin);
		gets_s(str);
		if (strcmp(str,"END_OF_TEXT")==0) break;
		//str[strlen(str) - 1] = '\0';
		
		strcat(tmp, str);
		strcat(s, tmp);
		
	}
	xLength = strlen(x);
	sLength = strlen(s);
	for (i = 0; i< sLength; i++) s[i]=tolower(s[i]);
	for (i = 0; i<xLength; i++) x[i]=tolower(x[i]);
	//printf("*%s", s);
	//putchar('\n');
	p1 = s;
	p2 = x;
	

	while (*p1) {
		k = 1;
		if (*p1 == *p2) {
			//printf("*%c\n", *p1);
			for (k = 1; k <= xLength; k++) if (*(p2+k) != *(p1+k)) { 
				//printf("*%d %c %c\n",i, *(p2 + k), *(p1+ k)); 
				break; }
		}
		//printf("*%d %d\n",i+1, k);
		if (k == xLength) { cnt += 1;}
		*(p1++);
		i++;
	}
	/*while (i<=strlen(s)-strlen(x)) {
		j = 0;
		if (s[i] == x[j]) {
			for (k = 1; k <= strlen(x); k++)
				if (x[j + k] != s[i + k]) break;
		}
		if (k == strlen(x)) {
			flg = 1;
			break;
		}
		j++;
		i++;
	}
	*/
	printf("%d\n", cnt);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:17: error: implicit declaration of function 'gets_s' [-Wimplicit-function-declaration]
   16 |                 gets_s(str);
      |                 ^~~~~~
Language: C

computer
Nurtures computer scientists and highly-skilled computer engineers
who will create and exploit "knowledge" for the new era.
Provides an outstanding computer environment.
END_OF_TEXT

Compiler output:
main.c:1:1: error: unknown type name 'computer'
    1 | computer
      | ^~~~~~~~
main.c:2:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'computer'
    2 | Nurtures computer scientists and highly-skilled computer engineers
      |          ^~~~~~~~
main.c:2:10: error: unknown type name 'computer'
Language: C

w=input().lower()
c=[]
s=input()
while(s!='END_OF_TEXT'):
    c+=s.lower().split();
    s=input()
print(len([x for x in c if x==w]))

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | w=input().lower()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'w' [-Wimplicit-int]
main.c:1:3: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | w=input().lower()
      |   ^~~~~
main.c:1:10: error: request for member 'lower' in something not a structure or union
    1 | w=input().lower()
      |          ^
main.c:2:1: error: expected ',' or ';' before 'c'
    2 | c=[]
      | ^
main.c:4:10: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    4 | while(s!='END_OF_TEXT'):
      |          ^~~~~~~~~~~~~
main.c:6:5: warning: data definition has no type or storage class
    6 |     s=input()
      |     ^
main.c:6:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
main.c:6:7: error: initializer element is not constant
    6 |     s=input()
      |       ^~~~~
main.c:7:1: error: expected ',' or ';' before 'print'
    7 | print(len([x for x in c if x==w]))
      | ^~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
    int c=0,m,n,i,j=0;
    char str1[15],str2[1020],str3[15]="END_OF_TEXT",*p=NULL,str4[10020];
    scanf("%s",&str1);
    while(scanf("%s",&str2))
    {
        if(strcmp(str2,str3)==0)
            break;
        strlwr(str2);
        if(j)
        {
            strcat(str4,str2);
            strcpy(str2,str4);
        }
        p=str2;
        while(1)
        {
            p=strstr(p,str1);
            if(p==NULL)
            {
                break;
            }
            else
            {
                p++;
                c++;
            }
        }
        m=strlen(str1);
        n=strlen(str2);
        if(n>=m)
        {
            for(i=0;i<m-1;i++)
            {
                str4[i]=str2[n-m+i+1];
            }
            str4[i]='\0';
        }
        else
        {
            for(i=0;i<=n;i++)
            {
                str4[i]=str2[i];
            }
        }
        j=1;
    }
    printf("%d",c);
}

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

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

int main(void)
{
  char word[11];
  char text[1001][11];
  int i = 0;
  int cnt;

  scanf("%s", word);

  word = tolower(word);

  while(1) {
    for(i = 0; i < 1000; i++){
      scanf(" %s", text[i]);
      if (strcmp(text[i], "END_OF_TEXT") == 0)
	break;
      text[i] = tolower(text[i]);
      if (strcmp(text[i], word) == 0)
	cnt++;
    }
  }

  printf("%d\n", &cnt);

  return 0
}

Compiler output:
main.c: In function 'main':
main.c:14:18: error: passing argument 1 of 'tolower' makes integer from pointer without a cast [-Wint-conversion]
   14 |   word = tolower(word);
      |                  ^~~~
      |                  |
      |                  char *
In file included from main.c:3:
/usr/include/ctype.h:122:25: note: expected 'int' but argument is of type 'char *'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
main.c:14:8: error: assignment to expression with array type
   14 |   word = tolower(word);
      |        ^
main.c:21:29: error: passing argument 1 of 'tolower' makes integer from pointer without a cast [-Wint-conversion]
   21 |       text[i] = tolower(text[i]);
      |                         ~~~~^~~
      |                             |
      |                             char *
/usr/include/ctype.h:122:25: note: expected 'int' but argument is of type 'char *'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
main.c:21:15: error: assignment to expression with array type
   21 |       text[i] = tolower(text[i]);
      |               ^
main.c:29:11: error: expected ';' before '}' token
   29 |   return 0
      |           ^
      |           ;
   30 | }
      | ~
Language: C

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

int main(void) {


	char word[16];
	char sentense[1024];
	char t[1024];
	char tmp[16];

	int num[50];
	int combo[50];

	scanf("%s", word);
	scanf("%s", tmp);

	int cnt = 0;
	while (fgets(sentense, 1024, stdin) != NULL) {
		if ( strcmp(sentense, "END_OF_TEXT\n") == 0 ) {
			break;
		}
		int len = strlen(sentense) - 1;
		if (len > 0) {
			sentense[len - 1] = '\0';
		}
		char *ptr = strtok(sentense, " ");
		while (ptr != NULL ) {
			if (stricmp(ptr, word) == 0) {
				cnt++;
			}
			ptr = strtok(NULL, " ");
		}

	}

	printf("%d\n", cnt);

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:29:29: error: implicit declaration of function 'stricmp'; did you mean 'strncmp'? [-Wimplicit-function-declaration]
   29 |                         if (stricmp(ptr, word) == 0) {
      |                             ^~~~~~~
      |                             strncmp
Language: C

#include <stdio.h>
#include <string.h>
??
char lowerCaseChar(char ch)
{
????????char ret;
????????if (ch >= 0x41 && ch <= 0x5a) {
????????????????ret = ch + 0x20;
????????}
????????else {
????????????????ret = ch;
????????}
????????return ret;
}
??
void lowerCase(char *str)
{
????????int i;
????????for (i = 0; str[i] != '\0'; i++) {
????????????????str[i] = lowerCaseChar(str[i]);
????????}
}
??
int main(int argc, char *argv[])
{
????????char word[1001], search_word[11];
????????int i, cnt = 0;
??
????????memset(word, '\0', sizeof(word));
????????memset(search_word, '\0', sizeof(search_word));
??
????????scanf("%s", search_word);
??
????????lowerCase(search_word);
??
????????while (scanf("%s", word) != EOF) {
????????????????if (strcmp(word, "END_OF_TEXT") == 0) {
????????????????????????break;
????????????????}
??
????????????????lowerCase(word);
??
????????????????if (strcmp(word, search_word) == 0) {
????????????????????????cnt++;
????????????????}
????????}
??
????????printf("%d\n", cnt);
??
??
????????return 0;
}

Compiler output:
main.c:3:1: error: expected identifier or '(' before '?' token
    3 | ??
      | ^
main.c:15:1: error: expected identifier or '(' before '?' token
   15 | ??
      | ^
main.c:23:1: error: expected identifier or '(' before '?' token
   23 | ??
      | ^
Language: C

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

int main(){
  char word[11],sent[50],end[20];
  end='END_OF_TEXT'
  int cnt=0;
  scanf("%s",word);
  while(1){
    scanf(" %s",sent);
    if(strcmp(sent,end)){
      if(!(strcmp(sent,word))) cnt+=1;}
    else{
      printf("%d\n",cnt);
      break;}
    }
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:6:7: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    6 |   end='END_OF_TEXT'
      |       ^~~~~~~~~~~~~
main.c:6:6: error: assignment to expression with array type
    6 |   end='END_OF_TEXT'
      |      ^
main.c:6:20: error: expected ';' before 'int'
    6 |   end='END_OF_TEXT'
      |                    ^
      |                    ;
    7 |   int cnt=0;
      |   ~~~               
main.c:12:32: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
   12 |       if(!(strcmp(sent,word))) cnt+=1;}
      |                                ^~~
      |                                int
main.c:12:32: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
  char word[11],sent[50],end[20];
  end='END_OF_TEXT';
  int cnt=0;
  scanf("%s",word);
  while(1){
    scanf(" %s",sent);
    if(strcmp(sent,end)){
      if(!(strcmp(sent,word))) cnt+=1;}
    else{
      printf("%d\n",cnt);
      break;}
    }
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:6:7: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    6 |   end='END_OF_TEXT';
      |       ^~~~~~~~~~~~~
main.c:6:6: error: assignment to expression with array type
    6 |   end='END_OF_TEXT';
      |      ^
Language: C

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

int main(){
  char word[11],sent[50],end[20]='END_OF_TEXT';
  int cnt=0;
  scanf("%s",word);
  while(1){
    scanf(" %s",sent);
    if(strcmp(sent,end)){
      if(!(strcmp(sent,word))) cnt+=1;}
    else{
      printf("%d\n",cnt);
      break;}
    }
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:5:34: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    5 |   char word[11],sent[50],end[20]='END_OF_TEXT';
      |                                  ^~~~~~~~~~~~~
main.c:5:34: error: invalid initializer
Language: C

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

int main(){
  char word[11],sent[50],end[20]="END_OF_TEXT";
  int cnt=0;
  scanf("%s",word);
  while(1){
    scanf(" %s",sent);
    if(stricmp(sent,end)){
      if(!(strcmp(sent,word))) cnt+=1;}
    else{
      printf("%d\n",cnt);
      break;}
    }
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:10:8: error: implicit declaration of function 'stricmp'; did you mean 'strncmp'? [-Wimplicit-function-declaration]
   10 |     if(stricmp(sent,end)){
      |        ^~~~~~~
      |        strncmp
Language: C

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

int main( void )
{
	char w[11];
	char t[1001];
	int cnt = 0;
	
	scanf("%s", w);
	
	while( 1 ){
		scanf("%s", t);
		
		if(strcmp(t, "END_OF_TEXT") == 0) break;
		
		if(stricmp(t, w) == 0) cnt++;
	}
	
	printf("%d\n", cnt);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:20: error: implicit declaration of function 'stricmp'; did you mean 'strncmp'? [-Wimplicit-function-declaration]
   17 |                 if(stricmp(t, w) == 0) cnt++;
      |                    ^~~~~~~
      |                    strncmp
Language: C

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

void StrToLower(char *str);

int main( void )
{
	char w[11];
	char t[1001];
	int cnt = 0;
	
	scanf("%s", w);
	StrToLower(w);
	
	while( 1 ){
		scanf("%s", t);
		
		if(!strcmp(t, "END_OF_TEXT")) break;
		
		StrToLower(t);
		
		if(!stricmp(t, w)) cnt++;
	}
	
	printf("%d\n", cnt);
	
	return 0;
}

void StrToLower(char *str)
{
	char *ch;
	
	for(ch = str; *ch != '\0'; ch++){
		*ch = tolower(*ch);
	}
}

Compiler output:
main.c: In function 'main':
main.c:23:21: error: implicit declaration of function 'stricmp'; did you mean 'strncmp'? [-Wimplicit-function-declaration]
   23 |                 if(!stricmp(t, w)) cnt++;
      |                     ^~~~~~~
      |                     strncmp
Language: C

#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(){
char moji[1001];
char word[10];
int i,a;

scanf("%s",&word);

for(i=0;i<10;i++){
    word[i]=tolower(word[i]);
}



while(1){
scanf("%s",&moji);
if(moji=="END_OF_TEXT"){break;}

for(i=0;i<1001;i++){
    moji[i]=tolower(moji[i]);
}
if(strcmp(word,moji)==0)a++;

}

printf("%d\n",a);

return 0;

Compiler output:
main.c: In function 'main':
main.c:30:1: error: expected declaration or statement at end of input
   30 | return 0;
      | ^~~~~~
Language: C

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define //DEBUG

int main(){

	char strW[11] ={};					//????????????????±?
	char END[12]={"END_OF_TEXT"};		//???????????¶??¨
	char strT[1001]={};					//????????????????????¨

	int i = 0;							//???????????°
	int cnt = 0;						//????????????

	scanf("%s",strW);			//????????????????±?????????????????????????
#ifdef DEBUG
	printf("strW???%s\n",strW);
#endif

	for(i = 0 ; strW[i] != '\0' ; i++){		//strW[i]???\0??????????????§for????????????
			strW[i] = tolower(strW[i]);		//(??§??????????????°)?°?????????????????????????
	}
#ifdef DEBUG
	printf("?°???????????????????????????????strW???%s\n",strW);
#endif


	/*???????????????????????????*/
	while(1){
		scanf("%s",strT);				//?¬?????????????????????????
		
		int a = strcmp(strT,END);

		if( a ==0 ){			//strT???END_OF_TEXT?????£??????
			printf("%d\n",cnt);			//???????????????????????¨?????????
			return 0;					//?????????????????????????????????
		}

		/*???????????£??????????????¨????°??????????????????????*/
		for(i = 0 ; strT[i] != '\0' ; i++){		//strT[i]???\0??????????????§for????????????
			strT[i] = tolower(strT[i]);		//?????§??????????????°????°?????????????????????????
		}



		if(!strcmp(strT,strW)){			//strT???strW??¨?????´????????°strcmp???????????????0
			cnt++;						//????????´?????????????????¢??????
		}

	}//?????????????????????????????§?????????return?????\?????§??????????????¨????????????
	return 0;
}

Compiler output:
main.c:4:16: error: no macro name given in #define directive
    4 | #define //DEBUG
      |                ^
Language: C

#include <stdio.h>
#include <string.h>
#include <ctype.h>
//#define DEBUG

int main(){

	char strW[11] ={};					//????????????????±?
	char END[12]={"END_OF_TEXT"};		//???????????¶??¨
	char strT[1001]={};					//????????????????????¨

	int i = 0;							//???????????°
	int cnt = 0;						//????????????

	scanf("%s",strW);			//????????????????±?????????????????????????
#ifdef DEBUG
	printf("strW???%s\n",strW);
#endif

	for(i = 0 ; strW[i] != '\0' ; i++){		//strW[i]???\0??????????????§for????????????
			strW[i] = tolower(strW[i]);		//(??§??????????????°)?°?????????????????????????
	}
#ifdef DEBUG
	printf("?°???????????????????????????????strW???%s\n",strW);
#endif


	/*???????????????????????????*/
	while(1){
		scanf("%s",strT);				//?¬?????????????????????????
#ifdef DEBUG
	printf("strT???%s\n",strT);
#endif
		if(!strcmp(strT,END)){			//strT???END_OF_TEXT?????£??????
			printf("%d\n",cnt);			//???????????????????????¨?????????
			return 0;					//?????????????????????????????????
		}

		/*???????????£??????????????¨????°??????????????????????*/
		for(i = 0 ; strT[i] != '\0' ; i++){		//strT[i]???\0??????????????§for????????????
			strT[i] = tolower(strT[i]);		//?????§??????????????°????°?????????????????????????
		}

#ifdef DEBUG
	printf("?°???????????????????????????????strT???%s\n",strT);
#endif

		if(!strcmp(strT,strW)){			//strT???strW??¨?????´????????°strcmp???????????????0
			cnt++;						//????????´?????????????????¢??????
		}

	}//?????????????????????????????§?????????return?????\?????§??????????????¨????????????
	return 0;
}return 0;
}

Compiler output:
main.c:54:2: error: expected identifier or '(' before 'return'
   54 | }return 0;
      |  ^~~~~~
main.c:55:1: error: expected identifier or '(' before '}' token
   55 | }
      | ^
Language: C

#include <stdio.h>
#include <string.h>
#include <ctype.h>
//#define DEBUG

int main(){

	char strW[11] ={};					//????????????????±?
	char END[12]={"END_OF_TEXT"};		//???????????¶??¨
	char strT[1001]={};					//????????????????????¨

	int i = 0;							//???????????°
	int cnt = 0;						//????????????

	scanf("%s",strW);			//????????????????±?????????????????????????
#ifdef DEBUG
	printf("strW???%s\n",strW);
#endif

	for(i = 0 ; strW[i] != '\0' ; i++){		//strW[i]???\0??????????????§for????????????
			strW[i] = tolower(strW[i]);		//(??§??????????????°)?°???????????????????
	}
#ifdef DEBUG
	printf("?°???????????????????????????????strW???%s\n",strW);
#endif


	/*???????????????????????????*/
	while(1){
		scanf("%s",strT);				//?¬?????????????????????????
#ifdef DEBUG
	printf("strT???%s\n",strT);
#endif
		if(!strcmp(strT,END)){			//strT???END_OF_TEXT?????£??????
			printf("%d\n",cnt);			//???????????????????????¨?????????
			return 0;					//??????????????????????????????
		}

		/*???????????£??????????????¨????°??????????????????????*/
		for(i = 0 ; strT[i] != '\0' ; i++){		//strT[i]???\0??????????????§for??????
			strT[i] = tolower(strT[i]);		//?????§??????????????°????°????????????????
		}

#ifdef DEBUG
	printf("?°???????????????????????????????strT???%s\n",strT);
#endif

		if(!strcmp(strT,strW)){			//strT???strW??¨?????´????????°strcmp????????????
			cnt++;						//????????´?????????????????¢???
		}

	}//?????????????????????????????§?????????return?????\?????§??????????????¨????????????
	return 0;
}return 0;
}

Compiler output:
main.c:54:2: error: expected identifier or '(' before 'return'
   54 | }return 0;
      |  ^~~~~~
main.c:55:1: error: expected identifier or '(' before '}' token
   55 | }
      | ^
Language: C

#include<stdio.h>
#include<string.h>
#include<ctype.h>
#define N 1001

int main(void)
{
  int i, j, cnt = 0;
  char W[11], T[100][N], end[12];

  strcpy(end, "END_OF_TEXT");

  scanf("%s", W);
  W = tolower(W);

  for(i = 0; i < 100; i++) {
    gets(T[i]);
    T[i] = tolower(T[i]);
    if(strstr(T[i], end) != NULL) {
      break;
    }
  }

  for(i = 0; i < 100; i++) {
    for(j = 0; T[i][j] != '\0'; j++) {
      if(strstr(T[i], W) != NULL) {
	cnt++;
	strcpy(T[i], strstr(T[i], W) + strlen(W));
      }
    }
  }

  printf("%d\n", cnt);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:15: error: passing argument 1 of 'tolower' makes integer from pointer without a cast [-Wint-conversion]
   14 |   W = tolower(W);
      |               ^
      |               |
      |               char *
In file included from main.c:3:
/usr/include/ctype.h:122:25: note: expected 'int' but argument is of type 'char *'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
main.c:14:5: error: assignment to expression with array type
   14 |   W = tolower(W);
      |     ^
main.c:17:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   17 |     gets(T[i]);
      |     ^~~~
      |     fgets
main.c:18:21: error: passing argument 1 of 'tolower' makes integer from pointer without a cast [-Wint-conversion]
   18 |     T[i] = tolower(T[i]);
      |                    ~^~~
      |                     |
      |                     char *
/usr/include/ctype.h:122:25: note: expected 'int' but argument is of type 'char *'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
main.c:18:10: error: assignment to expression with array type
   18 |     T[i] = tolower(T[i]);
      |          ^
Language: C

#include<stdio.h>
#include<string.h>
#include<ctype.h>
#define N 1001

int main(void)
{
  int i, j, cnt = 0;
  char W[11], T[100][N], end[12];

  strcpy(end, "END_OF_TEXT");

  scanf("%s", W);
  (int)W = tolower(W);

  for(i = 0; i < 100; i++) {
    gets(T[i]);
    (int)T[i] = tolower(T[i]);
    if(strstr(T[i], end) != NULL) {
      break;
    }
  }

  for(i = 0; i < 100; i++) {
    for(j = 0; T[i][j] != '\0'; j++) {
      if(strstr(T[i], W) != NULL) {
	cnt++;
	strcpy(T[i], strstr(T[i], W) + strlen(W));
      }
    }
  }

  printf("%d\n", cnt);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   14 |   (int)W = tolower(W);
      |   ^
main.c:14:20: error: passing argument 1 of 'tolower' makes integer from pointer without a cast [-Wint-conversion]
   14 |   (int)W = tolower(W);
      |                    ^
      |                    |
      |                    char *
In file included from main.c:3:
/usr/include/ctype.h:122:25: note: expected 'int' but argument is of type 'char *'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
main.c:14:10: error: lvalue required as left operand of assignment
   14 |   (int)W = tolower(W);
      |          ^
main.c:17:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   17 |     gets(T[i]);
      |     ^~~~
      |     fgets
main.c:18:5: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   18 |     (int)T[i] = tolower(T[i]);
      |     ^
main.c:18:26: error: passing argument 1 of 'tolower' makes integer from pointer without a cast [-Wint-conversion]
   18 |     (int)T[i] = tolower(T[i]);
      |                         ~^~~
      |                          |
      |                          char *
/usr/include/ctype.h:122:25: note: expected 'int' but argument is of type 'char *'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
main.c:18:15: error: lvalue required as left operand of assignment
   18 |     (int)T[i] = tolower(T[i]);
      |               ^
Language: C


#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main(void){
    int i,count = 0;
    int alen,blen;
    char T[1100];
    char W[21];
    char a[]="END_OF_TEXT";
    scanf("%s",&W);
    alen = strlen(W);
    for(i=0;i<alen;i++){
        W[i] = tolower(W[i]);
    }
    while(1){
        scanf("%s",&T);
        if(strstr(T,a)!=0) break;
        blen = strlen(T);
        for(i=0;i<blen;i++){
            T[i] = tolower(T[i]);
        }
        if(strlen(T,W)!=0) count++;
    }
    printf("%d\n",count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:12: error: too many arguments to function 'strlen'
   23 |         if(strlen(T,W)!=0) count++;
      |            ^~~~~~
In file included from main.c:3:
/usr/include/string.h:407:15: note: declared here
  407 | extern size_t strlen (const char *__s)
      |               ^~~~~~
Language: C

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

int main ()
{
	char W[11] = "\0";
    char T[1001] = "\0";
    char END[12] = "END_OF_TEXT";		//??????????????¨
    
    int counter = 0;       				//???????????°
    int i = 0 ;							//???????????°
    
    scanf("%s", W);						//??¢????????????W???????´?
    
    for(i = 0 ; W[i] != \0 ; i++)
    {
    	W[i] = tolower(W[i]);       	//W????°??????????
    }

	/*????????????????????????????????????*/
    
    while(1)
    {
    	scanf("%s", T);					//T????¬?????????????????´?
        if(strcmp(T,END)==0)     		//T???END_OF_TEXT??§????????´???
        {
        	break;                      //?????????????????????
        }
        
        for(i = 0 ; T[i] != '\0' ; i++)
    	{
    		T[i] = tolower(T[i]);       	//T????°??????????
   		}
        
        if(strcmp(W,T)==0)
        {
        	counter++;
        }
    }
    
    printf("%d\n",counter);				//???????????¨???

}

Compiler output:
main.c: In function 'main':
main.c:15:25: error: stray '\' in program
   15 |     for(i = 0 ; W[i] != \0 ; i++)
      |                         ^
main.c:17:16: error: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
   17 |         W[i] = tolower(W[i]);           //W????°??????????
      |                ^~~~~~~
main.c:3:1: note: include '<ctype.h>' or provide a declaration of 'tolower'
    2 | #include <string.h>
  +++ |+#include <ctype.h>
    3 |
Language: C

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

int main ()
{
	char W[11] = "\0";
    char T[1001] = "\0";
    char END[12] = "END_OF_TEXT";		//??????????????¨
    
    int counter = 0;       				//???????????°
    int i = 0 ;	
    int j = 0						//???????????°
    
    scanf("%s", W);						//??¢????????????W???????´?
    
    for(i = 0 ; W[i] != \0 ; i++)
    {
    	W[i] = tolower(W[i]);       	//W????°??????????
    }

	/*????????????????????????????????????*/
    
    while(1)
    {
    	scanf("%s", T);					//T????¬?????????????????´?
        if(strcmp(T,END)==0)     		//T???END_OF_TEXT??§????????´???
        {
        	break;                      //?????????????????????
        }
        
        for(j = 0 ; T[j] != '\0' ; j++)
    	{
    		T[j] = tolower(T[j]);       	//T????°??????????
   		}
        
        if(strcmp(W,T)==0)
        {
        	counter++;
        }
    }
    
    printf("%d\n",counter);				//???????????¨???

}

Compiler output:
main.c: In function 'main':
main.c:14:5: error: expected ',' or ';' before 'scanf'
   14 |     scanf("%s", W);                                             //??¢????????????W???????´?
      |     ^~~~~
main.c:16:25: error: stray '\' in program
   16 |     for(i = 0 ; W[i] != \0 ; i++)
      |                         ^
main.c:18:16: error: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
   18 |         W[i] = tolower(W[i]);           //W????°??????????
      |                ^~~~~~~
main.c:3:1: note: include '<ctype.h>' or provide a declaration of 'tolower'
    2 | #include <string.h>
  +++ |+#include <ctype.h>
    3 |
Language: C

#include<cstdio>
 
int main(){
    char word[12];
    char eot[12] = "END_OF_TEXT";
    int i = 1;
    int count = 0;
    char c;
    bool b;
 
    word[0] = ' ';
 
    scanf("%c", &c);
    while(c - 10){
        if(96 < c && c < 123){
            word[i] = c - 32;
        }else{
            word[i] = c;
        }
        i++;
        scanf("%c", &c);
    }
    word[i] = ' ';
    i++;
 
    int j = 0, k = 0;
 
    c = ' ';
    char t = 'a';
 
    while(true){
        if(96 < c && c < 123){
            c -= 32;
            b = false;
        }else{
            if(c == '\n'){
                c = ' ';
            }
            b = true;
        }
 
        if(!(t == c && t == ' ')){
            if(word[j] == c){
                j++;
                if(j == i){
                    count++;
                    j = 1;
                }
            }else{
                j = 0;
            }
 
            if(eot[k] == c && b){
                k++;
                if(k == 11 ){
                    printf("%d\n", count);
                    return 0;
                }
            }else{
                k = 0;
            }
        }
        t = c;
        scanf("%c", &c);
    }
    return 0;
}
 
 

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

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

int main(){
  char w[16], t[1024];
  char *p;
  int cnt=0, i;
  
  scanf("%s", w);

  for(i=0; ; i++){
    scanf("%s", t);
    if(strcmp(t, "END_OF_TEXT\0")==0){
      break;
    })
    if(strcmp(w, t)==0){
      cnt++;
    }   
  }

  printf("%d\n", cnt);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:6: error: expected statement before ')' token
   15 |     })
      |      ^
Language: C

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

void bs(char a[]){
  int i,len;
  len = strlen(a);

  for(i=0; i<len; i++){
    if('A' <= a[i] && a[i] <= 'Z'){
      a[i] += 32;
    }
  }
}


int main(void)
{
  char x[10],y[100];
  int i=0;
  scanf("%s",&x);
  while(1){
    if(scanf("%s",&y) == EOF){
      break;
    }
    bs(y);
    if(strcmp(x,y) == 0){
      i++;
    }
  }
  printf("%d\n",i):
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:30:19: error: expected ';' before ':' token
   30 |   printf("%d\n",i):
      |                   ^
      |                   ;
Language: C

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

void BS(char a[]){
  int i,len;
  len = strlen(a);

  for(i=0; i<len; i++){
    if('A' <= a[i] && a[i] <= 'Z'){
      a[i] += 32;
    }
  }
}


int main(void)
{
  char x[10],y[100];
  int i=0;
  scanf("%s",&x);
  while(1){
    if(scanf("%s",&y) == EOF){
      break;
    }
    BS(y);
    if(strcmp(x,y) == 0){
      i++;
    }
  }
  printf("%d\n",i):
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:30:19: error: expected ';' before ':' token
   30 |   printf("%d\n",i):
      |                   ^
      |                   ;
Language: C

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

void BS(char a[]){
  int i,len;
  len = strlen(a);

  for(i=0; i<len; i++){
    if('A' <= a[i] && a[i] <= 'Z'){
      a[i] += 32;
    }
  }
}


int main(void)
{
  char x[10],y[100];
  int i=0;
  scanf("%s",&x);
  while(1){
    if(scanf("%s",&y) == EOF){
      break;
    }
    BS(y);
    if(strcmp(x,y) == 0){
      i++;
    }
}
  printf("%d\n",i):
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:30:19: error: expected ';' before ':' token
   30 |   printf("%d\n",i):
      |                   ^
      |                   ;
Language: C

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

int main(){
    char W[10],T[1000],end[]="END_OF_TEXT";
    int cnt=0;
    scanf("%s", W);
    
    while(1){
        scanf("%s", T);
        if(strcmp(T,end)==0)break;
        if(strcmp(T,W)==0){
            cnt++;
        }
        T={0};
    }
    printf("%d\n",cnt);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:11: error: expected expression before '{' token
   15 |         T={0};
      |           ^
Language: C

#include <stdio.h>
#include <string.h>
#include <ctype.h>
 
int main()
{
    int i;
 
    int sum = 0;
    char W[11], T[1001];
 
    scanf("%s", W);
    for( i = 0; W[i]; ++i ) W[i] = tolower(W[i]);
    while( 1 ){
        scanf("%s", T);
        if( strcmp("END_OF_TEXT", T) == 0 ) break;
        for( i = 0; T[i]; ++i ) T[i] = tolower(T[i]);
        if( strcmp(W, T) == 0 ) ++sum;
    }
 
    printf("%d\n", sum);
 
  

Compiler output:
main.c: In function 'main':
main.c:21:5: error: expected declaration or statement at end of input
   21 |     printf("%d\n", sum);
      |     ^~~~~~
Language: C

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

int main(void)
{
	int i, n, x;
	char T[1001], W[11];
	
	scanf("%s", W);
	x = strlen(W);
	
	n = 0;
	while(1){
		scanf("%s", T);
		if(!memcmp(T, "END_OF_TEXT", strlen("END_OF_TEXT"))) break;
		for(i = 0; T[i] != 0x00; i++){
			if(!strnicmp(&T[i], W, x)) n++;
		}
	}
	printf("%d\n", n);
	
	return(0);
}



Compiler output:
main.c: In function 'main':
main.c:17:29: error: implicit declaration of function 'strnicmp'; did you mean 'strncmp'? [-Wimplicit-function-declaration]
   17 |                         if(!strnicmp(&T[i], W, x)) n++;
      |                             ^~~~~~~~
      |                             strncmp
Language: C

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

int main(void){
    char s[10];
    char t[1000];
    int count = 0;
    int i;

    scanf("%s", s);
    for(scanf("%s", t); strcmp(t, "END_OF_TEXT"); scanf("%s", t)){
        if (!strcmp(w, t))
            count++;
    }
    printf("%d\n", count);
    return 0;
}


Compiler output:
main.c:2:2: error: invalid preprocessing directive #imclude; did you mean #include?
    2 | #imclude <string.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:11:25: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   11 |     for(scanf("%s", t); strcmp(t, "END_OF_TEXT"); scanf("%s", t)){
      |                         ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | #imclude <string.h>
main.c:12:21: error: 'w' undeclared (first use in this function)
   12 |         if (!strcmp(w, t))
      |                     ^
main.c:12:21: 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[10];
    char t[1000];
    int count = 0;
    int i;

    scanf("%s", s);
    for(scanf("%s", t); strcmp(t, "END_OF_TEXT"); scanf("%s", t)){
        if(!strcmp(w, t))
            count++;
    }
    printf("%d\n", count);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:20: error: 'w' undeclared (first use in this function)
   12 |         if(!strcmp(w, t))
      |                    ^
main.c:12:20: 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[10];
    char t[1000];
    int count = 0;
    int i;

    scanf("%s", s);
    for(scanf("%s", t); strcmp(t, "END_OF_TEXT"); scanf("%s", t)){
        if(!strcmp(w, t))
        count++;
    }
    printf("%d\n", count);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:20: error: 'w' undeclared (first use in this function)
   12 |         if(!strcmp(w, t))
      |                    ^
main.c:12:20: 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[10];
    char t[1000];
    int count = 0;
    int i = 0;

    scanf("%s", s);
    while(s[i]){
        s[i] = toupper(s[i]);
        i++;
    }
    for(scanf("%s", t); strcmp(t, "END_OF_TEXT"); scanf("%s", t)){
        i = 0;
        while(t[i]){
            t[i] = toupper(t[i]);
            i++;
        }
        if(!strcmp(w, t))
        count++;
    }
    printf("%d\n", count);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:16: error: implicit declaration of function 'toupper' [-Wimplicit-function-declaration]
   12 |         s[i] = toupper(s[i]);
      |                ^~~~~~~
main.c:3:1: note: include '<ctype.h>' or provide a declaration of 'toupper'
    2 | #include <string.h>
  +++ |+#include <ctype.h>
    3 | 
main.c:21:20: error: 'w' undeclared (first use in this function)
   21 |         if(!strcmp(w, t))
      |                    ^
main.c:21:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
int main(){
  char line[1000];
  char word[10];
  char end[]="END_OF_TEXT";		/* 終了条件 */
  int count=0;					/* lineの中のwordの数 */
  char tmp[10];
  int i;
  int length;
  //wordの取得
  fgets(word, sizeof(word), stdin);
  word[strlen(word)-1]='\0';
  //  printf("word : %s\n", word);
  //チェック
  char *str_ptr;
  while(1){
	fgets(line, sizeof(line), stdin);
  
	if(strcmp(line, end)==0)	/* 終了条件 */
	  break;

	str_ptr=strtok(line, " ");
	/* printf("done\n"); */
	/* fflush(stdout); */

	while(1){
	  if(str_ptr==NULL)
		break;
	  if(stricmp(word, srt_ptr)==0)
		++count;
	  str_ptr=strtok(NULL, " "); 
	}
  }
  printf("%d\n", count);
  return 0;
}




Compiler output:
main.c: In function 'main':
main.c:30:14: error: implicit declaration of function 'stricmp'; did you mean 'strncmp'? [-Wimplicit-function-declaration]
   30 |           if(stricmp(word, srt_ptr)==0)
      |              ^~~~~~~
      |              strncmp
main.c:30:28: error: 'srt_ptr' undeclared (first use in this function); did you mean 'str_ptr'?
   30 |           if(stricmp(word, srt_ptr)==0)
      |                            ^~~~~~~
      |                            str_ptr
main.c:30:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

/* 関数名：文字列入力 */
/* 概要：文字列を入力する。その長さを返す */
/* 引数：文字列を格納する配列の先頭アドレス、その配列の大きさ */
/* 戻り値：入力された文字列の長さ */
unsigned short s_scan_sentence(unsigned char * str, unsigned short length_max)
{
	unsigned short usW_C_count_text = COUNT_RESET;  	/* 文字列長カウンタ */
	unsigned short usW_C_i;                         	/* ループ変数 */

	/* 文字列の入力 */
	for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){
		scanf("%c", str + usW_C_i);
		/* 入力終了の処理 */
		if(*(str + usW_C_i) == '\n'){
			break;
		}
		/* 文字数をカウント */
		usW_C_count_text++;
	}

	/* 文字列長を返す */
	return usW_C_count_text;
}


Compiler output:
main.c: In function 's_scan_sentence':
main.c:7:43: error: 'COUNT_RESET' undeclared (first use in this function)
    7 |         unsigned short usW_C_count_text = COUNT_RESET;          /* 文字列長カウンタ */
      |                                           ^~~~~~~~~~~
main.c:7:43: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:23: error: 'LOOP_RESET' undeclared (first use in this function)
   11 |         for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){
      |                       ^~~~~~~~~~
main.c:12:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   12 |                 scanf("%c", str + usW_C_i);
      |                 ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | /* 関数名：文字列入力 */
main.c:12:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   12 |                 scanf("%c", str + usW_C_i);
      |                 ^~~~~
main.c:12:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
Language: C

#include<stdio.h>
int serch_word(char * str1, char * str2);
int main(){
	char str1[10], str2[1000];
	int long1, long2;
	int count = 0;
	int i;
	
	for(i = 0;i < 10;i++){
		str1[i] = 0;
	}
	for(i = 0;i < 1000;i++){
		str2[i] = 0;
	}
	
	long1 = s_scan_word(str1, 1000);
	
	while(1){
		long2 = s_scan_word(str2, 1000);
		if(serch_word("END_OF_TEXT\n", str2)){
			break;
		}
		if(long1 == long2){
			count += serch_word(str1, str2);
		}
		for(i = 0;i < long2;i++){
		str2[i] = 0;
		}
	}
	
	printf("%d\n", count);
	return 0;
}

/* 関数名：文字列入力 */
/* 概要：文字列を入力する。その長さを返す */
/* 引数：文字列を格納する配列の先頭アドレス、その配列の大きさ */
/* 戻り値：入力された文字列の長さ */
unsigned short s_scan_word(unsigned char * str, unsigned short length_max)
{
	unsigned short usW_C_count_text = COUNT_RESET;  	/* 文字列長カウンタ */
	unsigned short usW_C_i;                         	/* ループ変数 */

	/* 文字列の入力 */
	for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){
		scanf("%c", str + usW_C_i);
		/* 入力終了の処理 */
		if((*(str + usW_C_i) == ' ') || (*(str + usW_C_i) == '\n')){
			break;
		}
		/* 文字数をカウント */
		usW_C_count_text++;
	}

	/* 文字列長を返す */
	return usW_C_count_text;
}

int serch_word(char * str1, char * str2)
{
	char * word = str1, sent = str2;
	int frg = 0;
	int i = 0;
	while(1){
		if(*(word + i) == '\n'){
			frg =1;
		}
		if(*(word + i) != *(sent + i)){
			break;
		}
		i++;
	}
	
	return frg;
}


Compiler output:
main.c: In function 'main':
main.c:16:17: error: implicit declaration of function 's_scan_word' [-Wimplicit-function-declaration]
   16 |         long1 = s_scan_word(str1, 1000);
      |                 ^~~~~~~~~~~
main.c: At top level:
main.c:39:16: error: conflicting types for 's_scan_word'; have 'short unsigned int(unsigned char *, short unsigned int)'
   39 | unsigned short s_scan_word(unsigned char * str, unsigned short length_max)
      |                ^~~~~~~~~~~
main.c:16:17: note: previous implicit declaration of 's_scan_word' with type 'int()'
   16 |         long1 = s_scan_word(str1, 1000);
      |                 ^~~~~~~~~~~
main.c: In function 's_scan_word':
main.c:41:43: error: 'COUNT_RESET' undeclared (first use in this function)
   41 |         unsigned short usW_C_count_text = COUNT_RESET;          /* 文字列長カウンタ */
      |                                           ^~~~~~~~~~~
main.c:41:43: note: each undeclared identifier is reported only once for each function it appears in
main.c:45:23: error: 'LOOP_RESET' undeclared (first use in this function)
   45 |         for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){
      |                       ^~~~~~~~~~
main.c: In function 'serch_word':
main.c:61:36: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   61 |         char * word = str1, sent = str2;
      |                                    ^~~~
main.c:68:35: error: invalid type argument of unary '*' (have 'int')
   68 |                 if(*(word + i) != *(sent + i)){
      |                                   ^~~~~~~~~~~
Language: C

#include<stdio.h>
int serch_word(char * str1, char * str2);
unsigned short s_scan_word(unsigned char * str, unsigned short length_max);

int main(){
	char str1[10], str2[1000];
	int long1, long2;
	int count = 0;
	int i;
	
	for(i = 0;i < 10;i++){
		str1[i] = 0;
	}
	for(i = 0;i < 1000;i++){
		str2[i] = 0;
	}
	
	long1 = s_scan_word(str1, 1000);
	
	while(1){
		long2 = s_scan_word(str2, 1000);
		if(serch_word("END_OF_TEXT\n", str2)){
			break;
		}
		if(long1 == long2){
			count += serch_word(str1, str2);
		}
		for(i = 0;i < long2;i++){
		str2[i] = 0;
		}
	}
	
	printf("%d\n", count);
	return 0;
}

/* 関数名：文字列入力 */
/* 概要：文字列を入力する。その長さを返す */
/* 引数：文字列を格納する配列の先頭アドレス、その配列の大きさ */
/* 戻り値：入力された文字列の長さ */
unsigned short s_scan_word(unsigned char * str, unsigned short length_max)
{
	unsigned short usW_C_count_text = COUNT_RESET;  	/* 文字列長カウンタ */
	unsigned short usW_C_i;                         	/* ループ変数 */

	/* 文字列の入力 */
	for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){
		scanf("%c", str + usW_C_i);
		/* 入力終了の処理 */
		if((*(str + usW_C_i) == ' ') || (*(str + usW_C_i) == '\n')){
			break;
		}
		/* 文字数をカウント */
		usW_C_count_text++;
	}

	/* 文字列長を返す */
	return usW_C_count_text;
}

int serch_word(char * str1, char * str2)
{
	char * word = str1, sent = str2;
	int frg = 0;
	int i = 0;
	while(1){
		if(*(word + i) == '\n'){
			frg =1;
		}
		if(*(word + i) != *(sent + i)){
			break;
		}
		i++;
	}
	
	return frg;
}


Compiler output:
main.c: In function 's_scan_word':
main.c:43:43: error: 'COUNT_RESET' undeclared (first use in this function)
   43 |         unsigned short usW_C_count_text = COUNT_RESET;          /* 文字列長カウンタ */
      |                                           ^~~~~~~~~~~
main.c:43:43: note: each undeclared identifier is reported only once for each function it appears in
main.c:47:23: error: 'LOOP_RESET' undeclared (first use in this function)
   47 |         for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){
      |                       ^~~~~~~~~~
main.c: In function 'serch_word':
main.c:63:36: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   63 |         char * word = str1, sent = str2;
      |                                    ^~~~
main.c:70:35: error: invalid type argument of unary '*' (have 'int')
   70 |                 if(*(word + i) != *(sent + i)){
      |                                   ^~~~~~~~~~~