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

#include<stdio.h>
#include<string.h>
#define M 1046537
#define NIL (-1)
#define L 14


 char H[M][L];

 int getChar(char ch){
     if (ch=='A')return 1;
     else if (ch=='C')return 2;
     else if (ch=='G')return 3;
     else if (ch=='T')return 4;
     else return 0;
     }

 long long getKey(char str[]);{
     long long sum=0,p=1,i;
     for(int i=0;i<strlen(str);i++){
           sum+=p*(getChar(str[i]));
           p*=5;
           }
     return sum;
     }

 int h1(int x){
     return x%M;
     }

 int h2(int x){
     return 1+(x%(M-1));
     }

 int find(char str[]){
     long long x,i,h;
     x=getKey(str);
     for(i=0;;i++){
         h=(h1(x)+i*h2(x))%M;
         if(strcmp(H[h],str)==0)return 0;
         else if(strlen(H[h])==0)return 0;
         }
     return 0;
     }

 int insert(char str[]){
     long long x.i.h;
     x=getKey(str);
     for(i=0;;i++){
         h=(h1(x)+i*h2(x))%M;
         if(strcmp(H[h],str)==0)return 1;
         else if(strlen(H[h])==0){
             strcpy(H[h],str);
             return 0;
             }
         }
     return 0;
     }

 int main(){
     int i,n,h;
     char str[L],com[9];
     scanf("%d",&n);
     for(i=0;i<n;i++){
         scanf("%s%s",com,str);
         if(com[0]=='i'){
            insert(str);
            }
         else{
              if(find(str))printf("yes\n");
              else printf("no\n");
              }
         }
     return 0;
     }




Compiler output:
main.c:18:31: error: expected identifier or '(' before '{' token
   18 |  long long getKey(char str[]);{
      |                               ^
main.c: In function 'insert':
main.c:47:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   47 |      long long x.i.h;
      |                 ^
main.c:47:17: error: expected expression before '.' token
main.c:48:6: error: 'x' undeclared (first use in this function)
   48 |      x=getKey(str);
      |      ^
main.c:48:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:49:10: error: 'i' undeclared (first use in this function)
   49 |      for(i=0;;i++){
      |          ^
main.c:50:10: error: 'h' undeclared (first use in this function)
   50 |          h=(h1(x)+i*h2(x))%M;
      |          ^
Language: C

#include<stdio.h>
#include<string.h>
#define n 1000000
#define L 14

int insert(char *);
int find(char *);
int getchar(char);
int h1(int);
int h2(int);

char H[n][L];

int main(){
  int n,i,h;
  char str[12],com[9];
  for(i=0;i<n;i++){
    H[i][0] = '\0';
  }
  
  scanf("%d",&n);

  for(i=0;i<=n;i++){
    scanf("%s %s",com.str);
    if(com[0] == 'i'){
      insert(str);
    }else{
      if(find(str)==1){
	printf("yes\n");
      }else{
	printf("no\n");
      }
    }
  }
  return 0;
}

int h1(int x){
  return x % n;
}

int h2(int x){
  return 1 + (x % (n-1));
}

int getchar(char a){
  if(a == 'A')return 1;
  else if(a == 'C') return 2;
  else if(a == 'G') return 3;
  else if(a == 'T') return 4;
}

int find(char str[]){
  return 1;
  return 0;
}

int insert(char str[]){
  
}



Compiler output:
main.c:8:5: error: conflicting types for 'getchar'; have 'int(char)'
    8 | int getchar(char);
      |     ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: previous declaration of 'getchar' with type 'int(void)'
  582 | extern int getchar (void);
      |            ^~~~~~~
main.c: In function 'main':
main.c:3:11: error: expected identifier or '(' before numeric constant
    3 | #define n 1000000
      |           ^~~~~~~
main.c:15:7: note: in expansion of macro 'n'
   15 |   int n,i,h;
      |       ^
main.c:17:7: error: 'i' undeclared (first use in this function)
   17 |   for(i=0;i<n;i++){
      |       ^
main.c:17:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:14: error: lvalue required as unary '&' operand
   21 |   scanf("%d",&n);
      |              ^
main.c:24:22: error: request for member 'str' in something not a structure or union
   24 |     scanf("%s %s",com.str);
      |                      ^
main.c: At top level:
main.c:46:5: error: conflicting types for 'getchar'; have 'int(char)'
   46 | int getchar(char a){
      |     ^~~~~~~
/usr/include/stdio.h:582:12: note: previous declaration of 'getchar' with type 'int(void)'
  582 | extern int getchar (void);
      |            ^~~~~~~
Language: C

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

#define M 1000000/* your task*/
#define L 14

long IN[M];
int m=0;

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}

/* convert a string into an integer value */
long getKey(char str[]){
  long sum = 0, p = 1, i,x;
  x=strlen(str)
  for ( i = 0; i < x; i++ ){
    sum += getChar(str[i]);
    sum *= 10;
  }
  return sum;
}

int find(char str[]){
  int i;
  long f;

  f=getKey(str);
  IN[m]=f;
  
  for(i=0;f!=IN[i];i++){
    if(i==m) return 0;
    else return -1;
  }
}

int insert(char str[]){
  /* your task */
  IN[m++]=getKey(str);
  return 0;
}

int main(){
    int i, n, h;
    char str[L], com[9];
    
    scanf("%d", &n);
    
    for ( i = 0; i < n; i++ ){
	scanf("%s %s", com, str);
	
	if ( com[0] == 'i' ){
	    insert(str);
	} else {
	    if (find(str)==0){
		printf("yes\n");
	    } else {
		printf("no\n");
	    }
	}
    }

    return 0;
}



Compiler output:
main.c: In function 'getKey':
main.c:21:16: error: expected ';' before 'for'
   21 |   x=strlen(str)
      |                ^
      |                ;
   22 |   for ( i = 0; i < x; i++ ){
      |   ~~~
Language: C

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

#define M 1046527
#define NIL -1
#define L 14

char H[M][L];

int getChar(char ch){
  if(ch == 'A') return 1;
  else if(ch == 'C') return 2;
  else if(ch == 'G') return 3;
  else if(ch == 'T') return 4;
  else return 0;
}

long long getKey(char str[]){
  long long sum = 0,p = 1,i;
  for(i=0;i<strlen(str[i]);i++){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int h1(int key){
  return key % M;
}
int h2(int key){
  return 1 + (key % (M - 1));
}

int find(char str[]){
  long long key,i,h;
  key = getKey(str);
  for(i=0;;i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h],str) == 0) return 1;
    else if(strlen(H)[h] == 0) return 0;
  }
  return 0;
}

int insert(char str[]){
  long long key,i,h;
  key = getKey(str);
  for(i=0;;i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h],str) == 0) return 1;
    else if(strlen(H[h],str) == 0;){
      strcpy(H[h],str);
      return 0;
    }
  }
}

int main(){
  int i,n,h;
  char str[L],com[9];
  for(i=0;i<M;i++) H[i][0] = '\0';
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s %s",com,str);

    if(com[0] == 'i'){
      insert(str);
    }
    else{
      if(find(str)){
	printf("yes\n");
      }
      else {
	printf("no\n");
      }
    }
  }
  return 0;
}



Compiler output:
main.c: In function 'getKey':
main.c:20:23: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
   20 |   for(i=0;i<strlen(str[i]);i++){
      |                    ~~~^~~
      |                       |
      |                       char
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c: In function 'find':
main.c:40:20: error: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
   40 |     else if(strlen(H)[h] == 0) return 0;
      |                    ^
      |                    |
      |                    char (*)[14]
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char (*)[14]'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:40:22: error: subscripted value is neither array nor pointer nor vector
   40 |     else if(strlen(H)[h] == 0) return 0;
      |                      ^
main.c: In function 'insert':
main.c:51:13: error: too many arguments to function 'strlen'
   51 |     else if(strlen(H[h],str) == 0;){
      |             ^~~~~~
/usr/include/string.h:407:15: note: declared here
  407 | extern size_t strlen (const char *__s)
      |               ^~~~~~
main.c:51:34: error: expected ')' before ';' token
   51 |     else if(strlen(H[h],str) == 0;){
      |            ~                     ^
      |                                  )
Language: C

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

#define M 1000000
#define L 14

char H[M][L]; /* Hash Table */

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}

/* convert a string into an integer value */
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int h1(int key){ return key % M; }
int h2(int key){ return 1 + (key % (M - 1)); }

int find(char str[]){
  long long key,i,h;
  key = getKey(str);
  while(1){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h],str) == 0) return 1;
    else if(strlen(H[h]) == 0) return 0;
  }
  return 0;
}

int insert(char str[]){
  long long key,i,h;
  key = getKey(str);
  while(1){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h],str) == 0) return 1;
    else if(stlren(H[h]) == 0){
      strcpy(H[h],str);
      return 0;
    }
  }
  return 0;
}

int main(){
    int i, n, h;
    char str[L], com[9];
    for ( i = 0; i < M; i++ ) H[i][0] = '\0';
    
    scanf("%d", &n);
    
    for ( i = 0; i < n; i++ ){
	scanf("%s %s", com, str);
	
	if ( com[0] == 'i' ){
	    insert(str);
	} else {
	    if (find(str)){
		printf("yes\n");
	    } else {
		printf("no\n");
	    }
	}
    }

    return 0;
}



Compiler output:
main.c: In function 'insert':
main.c:46:13: error: implicit declaration of function 'stlren'; did you mean 'strlen'? [-Wimplicit-function-declaration]
   46 |     else if(stlren(H[h]) == 0){
      |             ^~~~~~
      |             strlen
Language: C

#include <iostream>
#include <string>
#include <cstring>
using namespace std;

char stock[1000000][4];

int find(char ch[],int t)
{
  for(int i = 0;i < t;i++)
  {
    if(strcmp(ch,stock[i]) == 0) return 1;
  }
  return 0;
}

int main()
{
  int n,t = 0;
  char com[7],ch[4];

  cin >> n;
  for(int i = 0;i < n;i++)
  {
    cin >> com >> ch;

    if(com[0] == 'i')
    {
      strcpy(stock[t],ch); t++;
    }
    else if(com[0] == 'f')
    {
      if(find(ch,t)) cout << "yes" << endl;
      else cout << "no" << endl;
    }
  }

  return 0;
}



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

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

#define M  1000000/* your task*/
#define L 14

char H[M][L]; /* Hash Table */

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}

/* convert a string into an integer value */
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int h1(int key){ return key % M/* your task */; }
int h2(int key){ return (key % (M-1)) +1/* your task */; }

int find(char str[]){

  /* your task */
  int key,i=0,j;

  key = getKey(str);
  for(i=0;i<M;i++){
    j = (h1(key) +i * h2(key)) % M;
    if(H[j][0] == '\0') return 0;
    else if(strcmp(H[j],str) == 0){
      return 1;
      break;
    }
  }
}

int insert(char str[]){

  /* your task */
  int key,i=0,j;

  key = getKey(str);

  for(i=0;i<M;i++){
    j = (h1(key) +i * h2(key)) % M;
    if(H[j][0] == '\0'){
      strcpy(H[j],str);
      break;
    }
  }
  return 0;
}



int main(){
  int i, n, h;
  char str[L], com[9];
  for ( i = 0; i < M; i++ ) H[i][0] = '\0';

  scanf("%d", &n);

  for ( i = 0; i < n; i++ ){
    scanf("%s %s", com, str);

    if ( com[0] == 'i' ){
      insert(str);
    } else {
      if (find(str)){
        printf("yes\n");
      } else {
        printf("no\n
      }
    }
  }

  return 0;
}





Compiler output:
main.c: In function 'main':
main.c:80:16: warning: missing terminating " character
   80 |         printf("no\n
      |                ^
main.c:80:16: error: missing terminating " character
   80 |         printf("no\n
      |                ^~~~~
main.c:81:7: error: expected expression before '}' token
   81 |       }
      |       ^
main.c:80:16: error: expected ';' before '}' token
   80 |         printf("no\n
      |                ^
      |                ;
   81 |       }
      |       ~
Language: C

#include<stdio.h>
#include<string.h>
#define NIL (-1)
#define m 1046527
char T[m][14];
int h1(int key) {return key%m;}
int h2(int key) {return key%(m-1);}


int getChar(char ch){
    if (ch=='A') return 1;
    else if (ch=='C') return 2;
    else if (ch=='G') return 3;
    else if (ch=='T') return 4;
    else return 0;
}

long long getKey(char moji[]){
    long long sum=0,p=1,i;
    for(i=0;i<strlen(moji);i++){
        sum+=p*(getChar(moji[i]));
        p*=5;
    }
    return sum;
}


int search(char moji[]){
    long long key,i,h;
    key=getKey(moji);
    for(i=0;;i++){
        h=(h1(key)+1*h2(key))%m;
        if(strcmp(T[h],moji)==0) return 1;
        else if(strlen(T[h])==0)return 0;
    }
    return 0;
}

int insert(char moji[]){
    long long key,i,h;
    key=getKey(moji);
    for(i=0;;i++){
        h=(h1(key)+1*h2(key))%m;
        if(strcmp(T[h],moji)==0) return 1;
        else if(strlen(T[h])==0){
            strcpy(T[h],moji);
            return 0;
        }
    }
    return 0;
}


int main(void){
    int i,n;
    char order[9],moji[14];
     for ( i = 0; i < M; i++ ) T[i][0] = '\0';
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%s%s",order,moji);
        if(order[0]=='i') insert(moji);
        else if(search(moji)) printf("yes\n");
        else printf("no\n");
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:57:23: error: 'M' undeclared (first use in this function)
   57 |      for ( i = 0; i < M; i++ ) T[i][0] = '\0';
      |                       ^
main.c:57:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

#define M /* your task*/
#define NIL (-1)
#define L 14

char H[M][L]; /* Hash Table */

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}

/* convert a string into an integer value */
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int h1(int key){ return /* your task */; }
int h2(int key){ return /* your task */; }

int find(char str[]){

    /* your task */

}

int insert(char str[]){

    /* your task */

}

int main(){
    int i, n, h;
    char str[L], com[9];
    for ( i = 0; i < M; i++ ) H[i][0] = '\0';
    
    scanf("%d", &n);
    
    for ( i = 0; i < n; i++ ){
	scanf("%s %s", com, str);
	
	if ( com[0] == 'i' ){
	    insert(str);
	} else {
	    if (find(str)){
		printf("yes\n");
	    } else {
		printf("no\n");
	    }
	}
    }

    return 0;
}

Compiler output:
main.c: In function 'h1':
main.c:27:18: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   27 | int h1(int key){ return /* your task */; }
      |                  ^~~~~~
main.c:27:5: note: declared here
   27 | int h1(int key){ return /* your task */; }
      |     ^~
main.c: In function 'h2':
main.c:28:18: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   28 | int h2(int key){ return /* your task */; }
      |                  ^~~~~~
main.c:28:5: note: declared here
   28 | int h2(int key){ return /* your task */; }
      |     ^~
main.c: In function 'main':
main.c:45:23: error: expected expression before ';' token
   45 |     for ( i = 0; i < M; i++ ) H[i][0] = '\0';
      |                       ^
main.c: At top level:
main.c:8:6: warning: array 'H' assumed to have one element
    8 | char H[M][L]; /* Hash Table */
      |      ^
Language: C

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

#define STR 12
#define N 1000000

int insert(int);
int find(int);

char str[N][STR],s1[N][7],s2[N][STR];
int n,last=0;

int main(void){
  int i;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s %s",s1[i],s2[i]);
  }
  for(i=0;i<n;i++){
    
    if(strcmp(s1[i][0]=='i') insert(i) ;
    else if(s1[i][0]=='f') {
      if(find(i)==1) printf("yes\n");
      else printf("no\n");
    }
  }
  return 0;
}

int insert(int key){
  strcpy(str[last],s2[key]);
  last++;
  return 1;
}

int find(int key){
  int i;
  for(i=0;i<last;i++){
    if(strcmp(s2[key],str[i])==0) return 1;
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:23: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   23 |     if(strcmp(s1[i][0]=='i') insert(i) ;
      |               ~~~~~~~~^~~~~
      |                       |
      |                       int
In file included from main.c:3:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:23:8: error: too few arguments to function 'strcmp'
   23 |     if(strcmp(s1[i][0]=='i') insert(i) ;
      |        ^~~~~~
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
main.c:23:29: error: expected ')' before 'insert'
   23 |     if(strcmp(s1[i][0]=='i') insert(i) ;
      |       ~                     ^~~~~~~
      |                             )
main.c:28:3: error: expected expression before '}' token
   28 |   }
      |   ^
Language: C

#include <stdio.h>
#include <string.h>
#define M 100007
#define L 14
char H[M][L];

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int insert(char str[]){
  int i=0, h;
  long long k;
  k = getKey(str);
  while(1){
    if(H[h][0] == '\0') break;
    h = (k%M + i*(1+k%(M-1)))%M;
    i++;
  }
  strcpy(H[h], str);
}

int find(char str[]){
  int i, flag = 1;
  for(i = 0; i < M; i++){
    if(strcmp(str,H[i]) == 0){
      flag = 0;
      break;
    }
  }

  return flag;
}

int main(){
  int i, j, n;
  char str[L], com[9];
  for ( i = 0; i < M; i++ ) H[i][0] = '\0';    

  scanf("%d",&n);
  for(i = 0; i < n; i++){
    scanf("%s %s",com, str);

    if(com[0] == 'i'){
      insert(str);
    }
    else{
      flag = find(str);
      if(flag == 0){
	printf("yes\n");
      }
      else printf("no\n");
    } 
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:59:7: error: 'flag' undeclared (first use in this function)
   59 |       flag = find(str);
      |       ^~~~
main.c:59:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

struct node{
  char string[13];
  struct node *next;
  struct node *prev;
};

typedef struct node * NodePointer;

NodePointer head;
int count=0;

void init(){
  head = malloc(sizeof(struct node));
  head->next = head;
  head->prev = head;
  return;
}

void insert(char key[13]){
  NodePointer new;
  new = malloc(sizeof(struct node));
  strcpy(new->string,key);
  new->next = head;
  new->prev = head->prev;
  head->prev->next = new;
  head->prev = new;
  count++;
  return;
}

void find(char key[13]){
  NodePointer p,q;
  strcpy(head->string,key);
  if(count == 1){
    if(strcmp(head->next->string,key) == 0){
      printf("yes\n");
      return;
    }
    else{  
      printf("no\n");
      return;
    } 
  }
  for(p = head->next;strcmp(p->string) != 0;p=p->next){
    if( p == head){
      printf("yes\n");
      return;
    }
   else{
     printf("no\n");
     return;
   }
  }
}

Compiler output:
main.c: In function 'find':
main.c:48:22: error: too few arguments to function 'strcmp'
   48 |   for(p = head->next;strcmp(p->string) != 0;p=p->next){
      |                      ^~~~~~
In file included from main.c:3:
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
Language: C

typedef struct {
  char command[20];
  char word[12];
} jisho;

main()
{
  int n, i, j;
  jisho S[MAX];

  scanf("%d", &n);
  for(i=0; i<n; i++)
    {
      scanf("%s %s", S[i].command, S[i].word);
    }

  for(i=0; i<n; i++)
    {
      if(strcmp(S[i].command, "find") == 0)
	{
	  for(j=0; j<i; j++)
	    {
	      if(strcmp(S[j].command, "insert") == 0)
		{
		  if(strcmp(S[i].word, S[j].word) == 0)
		    {
		      printf("yes\n");
		      break;
		    }
		  else
		    {
		      continue;
		    }
		}

	      if(j == i-1)
		{
		  printf("no\n");
		}
	    }
	}
    }

  return 0;
}

Compiler output:
main.c:6:1: error: return type defaults to 'int' [-Wimplicit-int]
    6 | main()
      | ^~~~
main.c: In function 'main':
main.c:9:11: error: 'MAX' undeclared (first use in this function)
    9 |   jisho S[MAX];
      |           ^~~
main.c:9:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |   scanf("%d", &n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | typedef struct {
main.c:11:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |   scanf("%d", &n);
      |   ^~~~~
main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:19:10: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   19 |       if(strcmp(S[i].command, "find") == 0)
      |          ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strcmp'
  +++ |+#include <string.h>
    1 | typedef struct {
main.c:27:23: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   27 |                       printf("yes\n");
      |                       ^~~~~~
main.c:27:23: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:27:23: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:27:23: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:38:19: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   38 |                   printf("no\n");
      |                   ^~~~~~
main.c:38:19: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
#include<string.h>
#define M 1000003 
#define L 14
char H[M][L];
int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2; 
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
} /* convert a string into an integer value */ 
int getKey(char str[]){ 
  int sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
} 
int h1(int key){ 
  return key%M; 
} 
int h2(int key){ 
  return 1+key%(M-1); 
} 
int find(char str[]){
  int i=0,sum,k,n=0;
  sum=getKey(str);
  while(i<M){
    k=(h1(sum)+i*h2(sum))%M;
    if(strcmp(H[k],str)==0){
      n=1;
      break;
    }
    i++
  }   
  return n;
} 
int insert(char str[]){
  int sum,i=0,k; 
  sum=getKey(str);
  while(i<M){
    k=(h1(sum)+i*h2(sum))%M;
    if(H[k][0]=='\0'){
      strcpy(H[k],str);
      break;
    }
    i++;
  }
  
}
int main(){
  int i, n, h; 
  char str[L], com[9];
  for ( i = 0; i < M; i++ ) H[i][0] = '\0';
  scanf("%d", &n);
  for ( i = 0; i < n; i++ ){ 
    scanf("%s %s", com, str);
    if ( com[0] == 'i' ){ 
      insert(str); }
    else {
      if (find(str)){ 
	printf("yes\n");
      }
      else {
	printf("no\n");
      }
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'find':
main.c:35:8: error: expected ';' before '}' token
   35 |     i++
      |        ^
      |        ;
   36 |   }
      |   ~
Language: C

#include <stdio.h>
#include <string.h>
#define M 100007
#define L 14
char H[M][L];

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}
long long getKey(char str[]){
  long long sum = 0, p = 1, i, flag;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  Return sum;
}

int insert(char str[]){
  int i=0, h;
  long long k;
  k = getKey(str);
  while(1){
    if(H[h][0] == '\0') break;
    h = (k%M + i*(1+k%(M-1)))%M;
    i++;
  }
  strcpy(H[h], str);
}

int find(char str[]){
  int i, flag = 1;
  for(i = 0; i < M; i++){
    if(strcmp(str,H[i]) == 0){
      flag = 0;
      break;
    }
  }

  return flag;
}

int main(){
  int i, j, n;
  char str[L], com[9];
  for ( i = 0; i < M; i++ ) H[i][0] = '\0';    

  scanf("%d",&n);
  for(i = 0; i < n; i++){
    scanf("%s %s",com, str);

    if(com[0] == 'i'){
      insert(str);
    }
    else{
      flag = find(str);
      if(flag == 0){
	printf("yes\n");
      }
      else printf("no\n");
    } 
  }
  return 0;

Compiler output:
main.c: In function 'getKey':
main.c:19:3: error: unknown type name 'Return'
   19 |   Return sum;
      |   ^~~~~~
main.c:19:10: error: conflicting types for 'sum'; have 'int'
   19 |   Return sum;
      |          ^~~
main.c:14:13: note: previous definition of 'sum' with type 'long long int'
   14 |   long long sum = 0, p = 1, i, flag;
      |             ^~~
main.c: In function 'main':
main.c:59:7: error: 'flag' undeclared (first use in this function)
   59 |       flag = find(str);
      |       ^~~~
main.c:59:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:66:3: error: expected declaration or statement at end of input
   66 |   return 0;
      |   ^~~~~~
Language: C

#include <stdio.h>
#include <string.h>
#define M 1000007
#define L 14
char H[M][L];

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int find(char str[]){
  int i;
  long long k;
  k = getKey(str);
  for(i = 0; i < M; i++){
    h = (k%M + i*(1+k%(M-1)))%M;
    if(strcmp(str,H[h]) == 0){
      return 0;
    }
  }
  return 1;
}
void insert(char str[]){
  int i=0, h;
  long long k;
  k = getKey(str);
  for(i = 0; i< M; i++){
    h = (k%M + i*(1+k%(M-1)))%M;
    if(H[h][0] == '\0') break;
  }
  strcpy(H[h], str);
}


int main(){
  int i, j, n;
  char str[L], com[9];
  for ( i = 0; i < M; i++ ) H[i][0] = '\0';    

  scanf("%d",&n);
  for(i = 0; i < n; i++){
    scanf("%s %s",com, str);
    
    if(com[0] == 'i') insert(str);
    else{
      if(find(str) == 0) printf("yes\n");
      else printf("no\n");
    } 
  }
  return 0;
}

Compiler output:
main.c: In function 'find':
main.c:27:5: error: 'h' undeclared (first use in this function)
   27 |     h = (k%M + i*(1+k%(M-1)))%M;
      |     ^
main.c:27:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
#define M 1000007
#define L 14
char H[M][L];

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int h1(int key){ return key % M; }
int h2(int key){ return 1 + (key % (M + 1));}

int find(char str[]){
  int i, h=0;
  long long k;
  k = getKey(str);
  for(i = 0; i < M; i++){
    h = (h1(k) + i*h2(k))%M;
    if(H[(h1(key) + i * h2(key)) % M][0] == '\0') return 0;
    if(strcmp(str,H[h]) == 0) return 1;
  }
  return 0;
}
void insert(char str[]){
  int i=0, h;
  long long k;
  k = getKey(str);
  for(i = 0; i< M; i++){
    h = (k%M + i*(1+k%(M-1)))%M;
    if(H[h][0] == '\0') break;
  }
  strcpy(H[h], str);
}


int main(){
  int i, j, n;
  char str[L], com[9];
  for ( i = 0; i < M; i++ ) H[i][0] = '\0';    

  scanf("%d",&n);
  for(i = 0; i < n; i++){
    scanf("%s %s",com, str);
    
    if(com[0] == 'i') insert(str);
    else{
      if(find(str)) printf("yes\n");
      else printf("no\n");
    } 
  }
  return 0;
}

Compiler output:
main.c: In function 'find':
main.c:31:14: error: 'key' undeclared (first use in this function)
   31 |     if(H[(h1(key) + i * h2(key)) % M][0] == '\0') return 0;
      |              ^~~
main.c:31:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
#define M 1000007
#define L 14
char H[M][L];

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int h1(int key){ return key % M; }
int h2(int key){ return 1 + (key % (M + 1));}

int find(char str[]){
  int i, h=0;
  long long k;
  k = getKey(str);
  for(i = 0; i < M; i++){
    h = (h1(k) + i*h2(k))%M;
    if(H[(h][0] == '\0') return 0;
    if(strcmp(str,H[h]) == 0) return 1;
  }
  return 0;
}
void insert(char str[]){
  int i=0, h;
  long long k;
  k = getKey(str);
  for(i = 0; i< M; i++){
    h = (k%M + i*(1+k%(M-1)))%M;
    if(H[h][0] == '\0') break;
  }
  strcpy(H[h], str);
}


int main(){
  int i, j, n;
  char str[L], com[9];
  for ( i = 0; i < M; i++ ) H[i][0] = '\0';    

  scanf("%d",&n);
  for(i = 0; i < n; i++){
    scanf("%s %s",com, str);
    
    if(com[0] == 'i') insert(str);
    else{
      if(find(str)) printf("yes\n");
      else printf("no\n");
    } 
  }
  return 0;
}

Compiler output:
main.c: In function 'find':
main.c:31:12: error: expected ')' before ']' token
   31 |     if(H[(h][0] == '\0') return 0;
      |          ~ ^
      |            )
Language: C


int h1(int key){ return key % M; }
int h2(int key){ return 1 + (key % (M + 1));}

int find(char str[]){

Compiler output:
main.c: In function 'h1':
main.c:2:31: error: 'M' undeclared (first use in this function)
    2 | int h1(int key){ return key % M; }
      |                               ^
main.c:2:31: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'h2':
main.c:3:37: error: 'M' undeclared (first use in this function)
    3 | int h2(int key){ return 1 + (key % (M + 1));}
      |                                     ^
main.c: In function 'find':
main.c:5:1: error: expected declaration or statement at end of input
    5 | int find(char str[]){
      | ^~~
Language: C

#include<stdio.h>
#include<string.h>
#define N 1000000
#define M 12


char H[N][M];

int getChar(char ch){
  if(ch == 'A') return 1;
  else if(ch == 'C') return 2;
  else if(ch == 'G') return 3;
  else if(ch == 'T') return 4;
  else return 0;
}

long long getKey(char str[]){
  long long sum=0,p=1,i;
  for(i=0;i<strlen(str);i++){
    sum+=p*(getChar(str[i]));
    p*=5;
  }
  return sum;
}
int h1(int key){return key % N; }
int h2(int key){return    //printf("\n");1 + (key % (M - 1)); }

int find(char str[]){
  long long key,i,h;   //printf("\n");
  key=getKey(str);
  for(i=0;;i++){
    h = (h1(key)+i*h2(key)) % N;
    if(strcmp(H[h],str)==0) return 1;
    else if (strlen(H[h])==0) return 0;
  }
  return 0;
}

int insert(char str[])   //printf("\n");{
  long long key,i,h;
  key=getKey(str);
  for(i=0;;i++){
    h = (h1(key)+i*h2(key)) % N;
    if(strcmp(H[h],str)==0) return 1;
    else if (strlen(H[h])==0){
      strcpy(H[h],str);
      return 0;
    }
  }return 0;
}

main(){

  int i,j,n;
  char s[N],t[N];
  for(i=0;i<N;i++) H[i][0]='\0';
   scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s%s",s,t);
  
    if(s[0]=='i'){
      insert(t);
    }
    else{
      if(find(t)){
	printf("yes\n");
      }
      else{
	printf("no\n");
      }
    }
  }

  return 0;
}

Compiler output:
main.c: In function 'h2':
main.c:28:1: error: expected expression before 'int'
   28 | int find(char str[]){
      | ^~~
main.c:41:14: error: 'str' undeclared (first use in this function)
   41 |   key=getKey(str);
      |              ^~~
main.c:41:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:42:7: error: 'i' undeclared (first use in this function)
   42 |   for(i=0;;i++){
      |       ^
main.c:43:5: error: 'h' undeclared (first use in this function)
   43 |     h = (h1(key)+i*h2(key)) % N;
      |     ^
main.c: At top level:
main.c:52:1: error: return type defaults to 'int' [-Wimplicit-int]
   52 | main(){
      | ^~~~
main.c: In function 'main':
main.c:62:7: error: implicit declaration of function 'insert' [-Wimplicit-function-declaration]
   62 |       insert(t);
      |       ^~~~~~
main.c:65:10: error: implicit declaration of function 'find' [-Wimplicit-function-declaration]
   65 |       if(find(t)){
      |          ^~~~
Language: C

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

#define M 1046527
#define NIL (-1)
#define L 14

char H[M][L];

int getchar(char ch){
    if (ch == 'A')return 1;
    else if(ch == 'C')return 2;
    else if(ch == 'G')return 3;
    else if(ch == 'T')return 4;
    else return 0;
}

long long getkey(char str[]){
    long long sum = 0, p = 1,i;
    for (i = 0; i < strlen(str); i++) {
        sum += p*getchar(str[i]);
        p *= 5;
    }
    return sum;
}

int h1(int key){return key % M;}
int h2(int key){return 1 + (key % (M - 1));}

int find(char str[]){
    long long key, i, h;
    key = getkey(str);
    for (i = 0;; i++) {
        h = (h1(key) + i * h2(key) % M);
        if (strcmp(H[h], str)) {
            return 1;
        }else if(strlen(H[h]) == 0){
            strcpy(H[h], str);
            return 0;
        }
    }
    
    return 0;
    
}

int insert(char str[]){
    long long key, i, h;
    key = getkey(str);
    for (i = 0; ; i++) {
        h = (h1(key) + i * h2(key)% M);
        if (strcmp(H[h], str) == 0 ){
            return 1;
        }else if(strlen(H[h]) == 0 ){
            strcmp(H[h], str);
            return 0;
        }
    }
}

int main(){
    
    int i, n, h;
    char str[L], com[9];
    for (i = 0;i < M; i++) {
        H[i][0] = '\0';
    }
    scanf("%d", &n);
    for (i = 0; i < n; i++) {
        scanf("%s %s",&com, &str);
        
        if(com[0] == 'i'){
            insert(str);
        }else {
            if(find(str) == 1){
                printf("yes\n");
            }else{
                printf("no\n");
            }
        }
    }
    
    return 0;
}

Compiler output:
main.c:10:5: error: conflicting types for 'getchar'; have 'int(char)'
   10 | int getchar(char ch){
      |     ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: previous declaration of 'getchar' with type 'int(void)'
  582 | extern int getchar (void);
      |            ^~~~~~~
Language: C

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

#define BUF_SIZE 100

typedef struct list_tag{
  char *str;
  struct list_tag * next;
}list;

list *dict[] = {NULL, NULL, NULL, NULL,};

void print_list(list *l)
{
  list *now;

  now = l;
  while(now != NULL){
    printf("%s", now->str);
    now = now->next;
  }

  return ;
}

list *create(char *str)
{
  list *l;
  l = (list *)malloc(sizeof(list));
  l->str = str;
  l->next = NULL;

  return l;
}

int find_list(list *l, char*str)
{
  list *now;
  now = l;

  while(now != NULL){
    if(strcmp(str now->str) == 0) return 1;
    now = now->next;
  }

  return -1;
}

list *append(list *d, char *str)
{

  if(d == NULL){
    return create(str);
  }

  list *now;

  now = d;
  while(now->next != NULL){
    now = now->next;
  }

  now->next = create(str);

  return d;
}

int hash(char *str)
{
  int i;
  switch(str[0]){
  case 'A':
    i = 0;
    break;
  case 'C':
    i = 1;
    break;
  case 'G':
    i = 2;
    break;
  case 'T':
    i = 3;
    break;
  default:
    assert(0);
    break;
  }

  return i;
}
void insert(char *str)
{
  int i;

  i = hash(str);
  dict[i] = append(dict[i], str);

  return;
}

int find(char * str)
{
  int i;
  i = hash(str);
  return find_list(dict[i]);
}

int main(void)
{
  long n;
  long i;

  scanf("%10ld\n", &n);

  for(i = 0; i < n; i++){
    char buf[BUF_SIZE];
    char *tok;
    fgets(buf, BUF_SIZE, stdin);

    tok = strtok(buf, " ");
    if(tok[0] == 'i'){
      char *str;

      tok = strtok(NULL, "\n");
      str = (char *)malloc(strlen(tok) + 1);
      strcpy(str, tok);
      insert(str);
    }else if(tok[0] == 'f'){
      tok = strtok(NULL, "\n");

      int ret;
      ret = find(tok);
      if(ret == 1) printf("yes\n");
      else printf("no\n");
    }else{
      assert(0);
    }
  }

  print_list(dict[0]);

  return 0;
}

Compiler output:
main.c: In function 'find_list':
main.c:44:18: error: expected ')' before 'now'
   44 |     if(strcmp(str now->str) == 0) return 1;
      |              ~   ^~~~
      |                  )
main.c:44:8: error: too few arguments to function 'strcmp'
   44 |     if(strcmp(str now->str) == 0) return 1;
      |        ^~~~~~
In file included from main.c:2:
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
main.c: In function 'find':
main.c:107:10: error: too few arguments to function 'find_list'
  107 |   return find_list(dict[i]);
      |          ^~~~~~~~~
main.c:38:5: note: declared here
   38 | int find_list(list *l, char*str)
      |     ^~~~~~~~~
Language: C

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

#define BUF_SIZE 100

typedef struct list_tag{
  char *str;
  struct list_tag * next;
}list;

list *dict[] = {NULL, NULL, NULL, NULL,};

void print_list(list *l)
{
  list *now;

  now = l;
  while(now != NULL){
    printf("%s", now->str);
    now = now->next;
  }

  return ;
}

list *create(char *str)
{
  list *l;
  l = (list *)malloc(sizeof(list));
  l->str = str;
  l->next = NULL;

  return l;
}

int find_list(list *l, char*str)
{
  list *now;
  now = l;

  while(now != NULL){
    if(strcmp(str, now->str) == 0) return 1;
    now = now->next;
  }

  return -1;
}

list *append(list *d, char *str)
{

  if(d == NULL){
    return create(str);
  }

  list *now;

  now = d;
  while(now->next != NULL){
    now = now->next;
  }

  now->next = create(str);

  return d;
}

int hash(char *str)
{
  int i;
  switch(str[0]){
  case 'A':
    i = 0;
    break;
  case 'C':
    i = 1;
    break;
  case 'G':
    i = 2;
    break;
  case 'T':
    i = 3;
    break;
  default:
    assert(0);
    break;
  }

  return i;
}
void insert(char *str)
{
  int i;

  i = hash(str);
  dict[i] = append(dict[i], str);

  return;
}

int find(char * str)
{
  int i;
  i = hash(str);
  return find_list(dict[i]);
}

int main(void)
{
  long n;
  long i;

  scanf("%10ld\n", &n);

  for(i = 0; i < n; i++){
    char buf[BUF_SIZE];
    char *tok;
    fgets(buf, BUF_SIZE, stdin);

    tok = strtok(buf, " ");
    if(tok[0] == 'i'){
      char *str;

      tok = strtok(NULL, "\n");
      str = (char *)malloc(strlen(tok) + 1);
      strcpy(str, tok);
      insert(str);
    }else if(tok[0] == 'f'){
      tok = strtok(NULL, "\n");

      int ret;
      ret = find(tok);
      if(ret == 1) printf("yes\n");
      else printf("no\n");
    }else{
      assert(0);
    }
  }

  print_list(dict[0]);

  return 0;
}

Compiler output:
main.c: In function 'find':
main.c:107:10: error: too few arguments to function 'find_list'
  107 |   return find_list(dict[i]);
      |          ^~~~~~~~~
main.c:38:5: note: declared here
   38 | int find_list(list *l, char*str)
      |     ^~~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define N 10000

char Q[N][13];
int p;

int finditem(char *);
void insert(char *);

int finditem(char *moji){
  int i,j;
  for(i=0;i<p;i++){
    j = strcmp(moji,Q[i]);
    if(j==0) return 1;
  }
  return 0;
}

void insert(char *moji){
  int k;
  k = finditem(moji);
  if( k = 0 ){
    strcpy(Q[p],moji);
    p++;
  }
}

int main(){
  int i,j,n,a;
  char order[N][10],moji[13];

  scanf("%d",&n);

  for(j=0;j<n;j++){
    for(i=0;i<10;i++){
      if( scanf("%c",&order[j][i]) ) break;
      if( order[j][i] == ' '){
	strcpy(order[j][i],NULL)
	  break;
      }
      //scanf("%s",moji);
      //printf("%s\n",moji);
    }
    scanf("%s",moji);
    printf("%s\n",moji);
  }


  for(i=0;i<n;i++){
    if(strcmp(order[i],"insert")==0) insert(moji);
    else{
      a = finditem(moji);
      if( a == 1 ) printf("yes\n");
      else printf("no\n");
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:39:24: error: passing argument 1 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion]
   39 |         strcpy(order[j][i],NULL)
      |                ~~~~~~~~^~~
      |                        |
      |                        char
In file included from main.c:2:
/usr/include/string.h:141:39: note: expected 'char * restrict' but argument is of type 'char'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
main.c:39:33: error: expected ';' before 'break'
   39 |         strcpy(order[j][i],NULL)
      |                                 ^
      |                                 ;
   40 |           break;
      |           ~~~~~
Language: C

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

#define M 2000000
#define L 12

char H[M][L]; /* Hash Table */

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}

/* convert a string into an integer value */ 
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int h1(int key){ return key%M; }
int h2(int key){ return 1+(key%(M-1)); }
int h(int key,int i) { return (h1(key)+i*h2(key))%M; }

/*int find(char str[]){
  int i;
  for(i=0; H[i][0]!='\0' ;i++){
  if(strcmp(H[i],str)==0) return 1;
  }
  return 0;
  }*/

/*int insert(char str[]) {
  static int i=0;
  strcpy(H[i],str);
  i++;
  }*/

int find(char str[]) {
  long long k;
  int i = 0;
  int j;

  k = getKey(str);

  while(1){
    j = h(k,i);
    if(strcmp(H[j],str)==0) return j;
    else if(H[j][0] == '\0' || i >= M) return NULL;
    else i = i+1;
  }
}

int insert(char str[]) {
  long long k;
  int i=0;
  int j;

  k = getKey(str);
  while(1){
    j = h(k,i);
    if(H[j][0] == '\0'){
      strcpy(H[j],str);
      return j;
    }
    else i = i+1;
  }
}


int main(){
  int i, n, h;
  char str[L], com[9];
  for ( i = 0; i < M; i++ ) H[i][0] = '\0';
    
  scanf("%d", &n); // n:命令の数
    
  for ( i = 0; i < n; i++ ) {
    scanf("%s %s", com, str); //com:命令 str:文字列

    if ( com[0] == 'i' ){ //insertのとき
      insert(str);
      num++;
    } else {
      if (find(str)){
	printf("yes\n");
      } else {
	printf("no\n");
      }
    }
  }

  return 0;
}

Compiler output:
main.c: In function 'find':
main.c:54:47: error: returning 'void *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
   54 |     else if(H[j][0] == '\0' || i >= M) return NULL;
      |                                               ^~~~
main.c: In function 'main':
main.c:88:7: error: 'num' undeclared (first use in this function)
   88 |       num++;
      |       ^~~
main.c:88:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

#define M 
#define L 14

char H[M][L]; 

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}


long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int h1(int key){ return key % M; }
int h2(int key){ return 1 + (key % (M-1)); }

int find(char str[]){

  long long key,i,h;
  key = getkey(str);
  for(i=0;;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0)return 1;
    else if(strlen(H[h])==0)return 0;
  }
  return 0;
}

int insert(char str[]){
  
  long long key,i,h;
  key = getkey(str);
  for(i=0;;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0)return 1;
    else if(strlen(H[h])==0){
      strcpy(H[h],str);
      return 0;
    }
  }

  return 0;
}

int main(){
    int i, n, h;
    char str[L], com[9];
    for ( i = 0; i < M; i++ ) H[i][0] = '\0';
    
    scanf("%d", &n);
    
    for ( i = 0; i < n; i++ ){
	scanf("%s %s", com, str);
	
	if ( com[0] == 'i' ){
	    insert(str);
	} else {
	    if (find(str)){
		printf("yes\n");
	    } else {
		printf("no\n");
	    }
	}
    }

    return 0;
}

Compiler output:
main.c: In function 'h1':
main.c:26:32: error: expected expression before ';' token
   26 | int h1(int key){ return key % M; }
      |                                ^
main.c: In function 'find':
main.c:32:9: error: implicit declaration of function 'getkey'; did you mean 'getKey'? [-Wimplicit-function-declaration]
   32 |   key = getkey(str);
      |         ^~~~~~
      |         getKey
main.c:34:28: error: expected expression before ';' token
   34 |     h=(h1(key)+i*h2(key))%M;
      |                            ^
main.c: In function 'insert':
main.c:46:28: error: expected expression before ';' token
   46 |     h=(h1(key)+i*h2(key))%M;
      |                            ^
main.c: In function 'main':
main.c:60:23: error: expected expression before ';' token
   60 |     for ( i = 0; i < M; i++ ) H[i][0] = '\0';
      |                       ^
main.c: At top level:
main.c:7:6: warning: array 'H' assumed to have one element
    7 | char H[M][L];
      |      ^