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

#include <stdio.h>

int main(){
  int x,y,i,j,k,key,res=0,same[500],A[10000+1];

  scanf("%d",&x);
  for(i=0;i<x;i++){
    scanf("%d",&A[i]);
  }
  scanf("%d",&y);
  for(i=0;i<y;i++){
    scanf("%d",&key);
    if(Lsearch(A[j],key)==1)res++;
  }


  printf("%d\n",res);
  return 0;
}

int Lsearch(int B[],int n,int kkey){
  int i=0;
  B[n]=key;
  for(i=0;B[i]!=key;i++);
  return i!=n;
}

Compiler output:
main.c: In function 'main':
main.c:13:8: error: implicit declaration of function 'Lsearch' [-Wimplicit-function-declaration]
   13 |     if(Lsearch(A[j],key)==1)res++;
      |        ^~~~~~~
main.c: In function 'Lsearch':
main.c:23:8: error: 'key' undeclared (first use in this function); did you mean 'kkey'?
   23 |   B[n]=key;
      |        ^~~
      |        kkey
main.c:23:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define N 10000
 
int LinearSearch(int *,int,int);
int main(){   
  int i,n,q,S[N],T,c=0;
   
  scanf("%d",&n);
   
  for (i=0;i<n;i++){
    scanf("%d",&S[i]);
  }
 
  scanf("%d",&q);
   
  for (i=0;i<q;i++){
    scanf("%d",&T);
    if (Linearsearch(S,n,T)){
      c++;
    }
  }
   
  printf("%d\n",c);
  return 0;
}
 
int LinearSearch(int S[], int n, int T){  
  int i;
  for (i=0;i<n;i++){
    if (S[i]==T){
      return 1;
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:9: error: implicit declaration of function 'Linearsearch'; did you mean 'LinearSearch'? [-Wimplicit-function-declaration]
   18 |     if (Linearsearch(S,n,T)){
      |         ^~~~~~~~~~~~
      |         LinearSearch
Language: C

#include<stdio.h>
#define N 10000
 
int LinearSearch(int *,int,int);
int main(){   
  int i,n,q,S[N],T,c=0;
   
  scanf("%d",&n);
   
  for (i=0;i<n;i++){
    scanf("%d",&S[i]);
  }
 
  scanf("%d",&q);
   
  for (i=0;i<q;i++){
    scanf("%d",&T);
    if (Linearsearch(S,n,T)){
      c++;
    }
  printf("%d\n",c);
  return 0;
}
 
int LinearSearch(int S[], int n, int T){  
  int i;
  for (i=0;i<n;i++){
    if (S[i]==T){
      return 1;
    }
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:9: error: implicit declaration of function 'Linearsearch'; did you mean 'LinearSearch'? [-Wimplicit-function-declaration]
   18 |     if (Linearsearch(S,n,T)){
      |         ^~~~~~~~~~~~
      |         LinearSearch
main.c:34:1: error: expected declaration or statement at end of input
   34 | }
      | ^
Language: C

#include<stdio.h>
#define N 10001

int main(){

  int i,n,q,key,sum=0,A[N];

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }

  scanf("%d",&q);
  for(i=0; i<q; i++){
    scanf("%d",&key);
    if(linearSearch(A,n,key)){
      sum++;
    }
  }


  printf("%d\n",sum);
  return 0;

}

int linearSearch(int A[],int n,int key)
{
  int i=0;

  A[n]=key;
  if(A[0]==key){
    return 1;
  }
  while(A[i]!=key){
    i++;
  }
  if(i==n){
    return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:16:8: error: implicit declaration of function 'linearSearch' [-Wimplicit-function-declaration]
   16 |     if(linearSearch(A,n,key)){
      |        ^~~~~~~~~~~~
main.c: In function 'linearSearch':
main.c:40:3: error: expected declaration or statement at end of input
   40 |   }
      |   ^
Language: C

#include <stdio.h>
??
#define N 10000
#define Q 500
????
int main() 
{
????????int i,j,n,q,count=0;
????????int s[N],t[Q];
????????????
????????scanf("%d",&n);
????????for(i=0; i<n; i++) {
????????????????scanf("%d",&s[i]);
????????}
????????????
????????scanf("%d",&q);
????????for(i=0; i<q; i++) {
????????????????scanf("%d",&t[i]);
????????????????for(j=0; j<n; j++) {
????????????????????????if(t[i]==s[j]) {
????????????????????????????????count++;
????????????????????????????????break;
????????????????????????}
????????????????}
????????}
??
????????printf("%d\n",count);
????????????
????????return 0;
}

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

#include <stdio.h>

int main()
{
 int n,m,i,a[1000],b[1000],dem=0;
 scanf("%d",&n)
 for(i=0;i<n;i++)
 {
  scanf("%d",&a[i])
 }
 scanf("%d",&m)
 for(i=0;i<m;i++)
 {
  scanf("%d",&a[i])
 }
 for(i=0;i<n;i++)
 {
  for(j=0;j<m;j++)
  {
   if(a[i]==a[j])
    dem++;
  }
 }
 printf("%d",dem);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: expected ';' before 'for'
    6 |  scanf("%d",&n)
      |                ^
      |                ;
    7 |  for(i=0;i<n;i++)
      |  ~~~
Language: C

#include <stdio.h>

int main()
{
 int n,m,i,a[1000],b[1000],dem=0;
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {
  scanf("%d",&a[i]);
 }
 scanf("%d",&m);
 for(i=0;i<m;i++)
 {
  scanf("%d",&a[i]);
 }
 for(i=0;i<n;i++)
 {
  for(j=0;j<m;j++)
  {
   if(a[i]==a[j])
    dem++;
  }
 }
 printf("%d",dem);
 return 0;
}

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

#include <stdio.h>

int main()
{
 int n,m,i,j,a[10000],key,dem=0;
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {
  scanf("%d",&a[i]);
 }
 scanf("%d",&m);
 for(i=0;i<m;i++)
 {
  scanf("%d",&key);
   for(j=0;j<n;j++)
      if(a[j]==key){
    count++;
    break;
 }
 printf("%d\n",dem);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:5: error: 'count' undeclared (first use in this function)
   17 |     count++;
      |     ^~~~~
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

#include <stdio.h>

int main()
{
 int n,m,i,j,a[10000],key,dem=0;
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {
  scanf("%d",&a[i]);
 }
 scanf("%d",&m);
 for(i=0;i<m;i++)
 {
  scanf("%d",&key);
   for(j=0;j<n;j++)
      if(a[j]==key){
    dem++;
    break;
 }
 printf("%d\n",dem);
 return 0;
}

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

#include<stdio.h>

int search(int A[], int n, int key){
	int i=0;
	A[n] = key;
	while(A[i] != key) i++;
	return i != n;
}

int main(){
	int i, n, A[10000+1], q, key, sum=0;
	
	scannf("%d",&n);
	for(i=0;i<n;i++) scanf("%d",&A[i]);
	
	scanf("%d",&q);
	for(i=0;i<q;i++){
		scanf("%d",&key);
		if((search(A, n, key)) sum++;
		}
		
		printf("%d\n",sum);
		
		return 0;
	}
	

Compiler output:
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'scannf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   13 |         scannf("%d",&n);
      |         ^~~~~~
      |         scanf
main.c:19:39: error: expected ')' before 'sum'
   19 |                 if((search(A, n, key)) sum++;
      |                   ~                   ^~~~
      |                                       )
main.c:20:17: error: expected expression before '}' token
   20 |                 }
      |                 ^
Language: C

#include<stdio.h>

int search(int A[],int n,int key){
	int a=0;
	A[n]=key;
	while(A[i]!=key)i++;
	return i!=n;
}

int main(){
	int i,n,A[10000+1],q,key,sum=0;
	
	scanf("%d",&n);
	for(i=0;i<n;i++)scanf("%d",&A[i]);
	
	scanf("%d",&q);
	for(i=0;i<q;i++){
		scanf("%d",&key);
		if(search(A,n,key))sum++;
	}
	printf("%d\n",sum);
	
	return 0;
}

Compiler output:
main.c: In function 'search':
main.c:6:17: error: 'i' undeclared (first use in this function)
    6 |         while(A[i]!=key)i++;
      |                 ^
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main()
{
	int n,q,i,cnt = 0;
	int s[10000],t[500];
	
	scanf("%d",&n);
	
	for(i = 0; i < n; i++) scanf("%d",s + i);
	
	scanf("%d",&q);
	
	for(i = 0; i < q; i++) scanf("%d",t + i);
	
	for(i = 0; i < q; i++)
	{
		if(t[i] == s[i]) cnt++
	}
	
	printf("%d",cnt);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:39: error: expected ';' before '}' token
   18 |                 if(t[i] == s[i]) cnt++
      |                                       ^
      |                                       ;
   19 |         }
      |         ~
Language: C

#include<stdio.h>

int search(int A[], int n, int key){
	int i=0;
	A[n] = key;
	while(A[i] != key) i++;
	return i != n;
}

int main(){
	int i, n, A[10000+1], q, key, sum=0;
	
	scannf("%d",&n);
	for(i=0;i<n;i++) scanf("%d",&A[i]);
	
	scanf("%d",&q);
	for(i=0;i<q;i++){
		scanf("%d",&key);
		if(search(A, n, key)) sum++;
		}
		
		printf("%d\n",sum);
		
		return 0;
	}
	

Compiler output:
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'scannf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   13 |         scannf("%d",&n);
      |         ^~~~~~
      |         scanf
Language: C

include<stdio.h>
int search(int A[], int n, int key){
int i=0;
A[n]=key;
while (A[i] !=key)i++;
return i !=n;
}

int main(void){
int i,n,A[1000+1],j,key,sum=0;
scanf("%d",&n);
for(i=0;i<n;i++) scanf("%d",&A[i]);

scanf("%d" ,&j);
for(i=0;i<j;i++){
scanf("%d",&key);
if(search(A,n,key))sum++;
}
printf("%d\n",sum);
return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:11:1: 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 | include<stdio.h>
main.c:11:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 | scanf("%d",&n);
      | ^~~~~
main.c:11:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:17:4: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   17 | if(search(A,n,key))sum++;
      |    ^~~~~~
main.c:19:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   19 | printf("%d\n",sum);
      | ^~~~~~
main.c:19:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:19:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>

int search(int A[],int n,int key){
	int i=0;
	A[n]=key;
	while(A[i]!=key)i++;
	return i!=n;
}

int main(){int i,n,A[10000+,q],key,sum=0;
	
	scanf("%d",&n);
	for(i=0;i<n;i++)scanf("%d",&A[i]);
	
	scanf("%d",&q);
	for(i=0;i<q;i++){
		scanf("%d",&key);
		if(search(A,n,key))sum++;
	}
	printf("%d\n"sum);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:28: error: expected expression before ',' token
   10 | int main(){int i,n,A[10000+,q],key,sum=0;
      |                            ^
main.c:13:37: error: 'A' undeclared (first use in this function)
   13 |         for(i=0;i<n;i++)scanf("%d",&A[i]);
      |                                     ^
main.c:13:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:21: error: 'q' undeclared (first use in this function)
   15 |         scanf("%d",&q);
      |                     ^
main.c:17:29: error: 'key' undeclared (first use in this function)
   17 |                 scanf("%d",&key);
      |                             ^~~
main.c:18:36: error: 'sum' undeclared (first use in this function)
   18 |                 if(search(A,n,key))sum++;
      |                                    ^~~
main.c:20:22: error: expected ')' before 'sum'
   20 |         printf("%d\n"sum);
      |               ~      ^~~
      |                      )
Language: C

#include <stdio.h>

int search(int A[],int n, int key)
{
	int i = 0;
	A[n] = key;
	while(A[i] != key) i++;
	return i != n;
}

int main()
{
	int i,n,A[10000+1],q,key,sum = 0;
	
	scanf("%d",&n);
	for(i = 0; i < n; i++) scanf("%d",A + i);
	
	scanf("%d",&q);
	for(i = 0; i < q1; i++)
	{
		scanf("%d",&key);
		if(search(A,n,key)) sum++;
	}
	
	printf("%d\n",sum);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:24: error: 'q1' undeclared (first use in this function); did you mean 'q'?
   19 |         for(i = 0; i < q1; i++)
      |                        ^~
      |                        q
main.c:19:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int search(int A[],int n,int key){
	int = 0;
	A[n] = key;
	while(A[i] != key)i++;
	return i != n;
}

int main(){
	int i, n, A[10000+1], q, key, sum=0;
	
	scanf("%d",&n);
	for(i=0; i<n; i++)scanf("%d",&A[i]);
	
	sanf("%d",&q);
	for(i=0; i<q; i++){
		scanf("%d", &key);
		if(search(A, n, key))sum++;
	}
	printf("%d\n", sum);
	
	return 0;
}
		

Compiler output:
main.c: In function 'search':
main.c:4:13: error: expected identifier or '(' before '=' token
    4 |         int = 0;
      |             ^
main.c:6:17: error: 'i' undeclared (first use in this function)
    6 |         while(A[i] != key)i++;
      |                 ^
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:16:9: error: implicit declaration of function 'sanf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   16 |         sanf("%d",&q);
      |         ^~~~
      |         scanf
Language: C

#include<stdio.h>

int search(int A[],int n,int key){
	int　i = 0;
	A[n] = key;
	while(A[i] != key)i++;
	return i != n;
}

int main(){
	int i, n, A[10000+1], q, key, sum=0;
	
	scanf("%d",&n);
	for(i=0; i<n; i++)scanf("%d",&A[i]);
	
	sanf("%d",&q);
	for(i=0; i<q; i++){
		scanf("%d", &key);
		if(search(A, n, key))sum++;
	}
	printf("%d\n", sum);
	
	return 0;
}
		

Compiler output:
main.c: In function 'search':
main.c:4:12: error: stray '\343' in program
    4 |         int<U+3000>i = 0;
      |            ^~~~~~~~
main.c: In function 'main':
main.c:16:9: error: implicit declaration of function 'sanf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   16 |         sanf("%d",&q);
      |         ^~~~
      |         scanf
Language: C

#include<stdio.h>

int search(int A[],int n,int key){
	int　i = 0;
	A[n] = key;
	while(A[i] != key)i++;
	return i != n;
}

int main(){
	int i, n, A[10000+1], q, key, sum=0;
	
	scanf("%d",&n);
	for(i=0; i<n; i++)scanf("%d",&A[i]);
	
	scanf("%d",&q);
	for(i=0; i<q; i++){
		scanf("%d", &key);
		if(search(A, n, key))sum++;
	}
	printf("%d\n", sum);
	
	return 0;
}
		

Compiler output:
main.c: In function 'search':
main.c:4:12: error: stray '\343' in program
    4 |         int<U+3000>i = 0;
      |            ^~~~~~~~
Language: C

#include<stdio.h>

int search(int A[], int n, int key){
	int000 i=0;
	A[n]=key;
	while(A[i] != key)i++;
	return i != n;
}

int main(){j
	int i, n, A[10000+1], q, key, sum=0;
	
	scanf("%d",&n);
	for(i=0; i<n; i++) scanf("%d",&A[i]);
	
	scanf("%d",&q);
	for(i=0; i<q; i++){
		scanf("%d",&key);
		if(search(A, n, key)) sum++;
	}
	printf("%d\n",sum);
	
	return 0;
}

Compiler output:
main.c: In function 'search':
main.c:4:9: error: unknown type name 'int000'
    4 |         int000 i=0;
      |         ^~~~~~
main.c: In function 'main':
main.c:10:12: error: 'j' undeclared (first use in this function)
   10 | int main(){j
      |            ^
main.c:10:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:13: error: expected ';' before 'int'
   10 | int main(){j
      |             ^
      |             ;
   11 |         int i, n, A[10000+1], q, key, sum=0;
      |         ~~~  
main.c:13:21: error: 'n' undeclared (first use in this function)
   13 |         scanf("%d",&n);
      |                     ^
main.c:14:13: error: 'i' undeclared (first use in this function)
   14 |         for(i=0; i<n; i++) scanf("%d",&A[i]);
      |             ^
main.c:14:40: error: 'A' undeclared (first use in this function)
   14 |         for(i=0; i<n; i++) scanf("%d",&A[i]);
      |                                        ^
main.c:16:21: error: 'q' undeclared (first use in this function)
   16 |         scanf("%d",&q);
      |                     ^
main.c:18:29: error: 'key' undeclared (first use in this function)
   18 |                 scanf("%d",&key);
      |                             ^~~
main.c:19:39: error: 'sum' undeclared (first use in this function)
   19 |                 if(search(A, n, key)) sum++;
      |                                       ^~~
Language: C

include<stdio.h>

//?????¢??¢?´¢
int search(int A[],int n,int key){
	int i = 0;
	A[n] = key; //?????§n-1?????§ n?????????
	while( A[i] != key ) i++;
	return i != n;//???????????£?????´??????????????\?????????????????????
}

int main(){
	int i,n,A[10000+1],q,key,sum = 0;
	
	scanf("%d",&n);
	for(i=0; i < n; i++) scanf("%d", &A[i]);
	
	scanf("%d",&q);
	for(i = 0; i < q; i++){
		scnf("%d", &key);
		if( search(A, n, key) ) sum++;
	}
	printf("%d\n", sum);
	
	return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:14:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   14 |         scanf("%d",&n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:14:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   14 |         scanf("%d",&n);
      |         ^~~~~
main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:19:17: error: implicit declaration of function 'scnf' [-Wimplicit-function-declaration]
   19 |                 scnf("%d", &key);
      |                 ^~~~
main.c:20:21: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   20 |                 if( search(A, n, key) ) sum++;
      |                     ^~~~~~
main.c:22:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |         printf("%d\n", sum);
      |         ^~~~~~
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

include<stdio.h>

int search(int A[],int n,int key){
	int i = 0;
	A[n] = key; 
	while( A[i] != key ) i++;
	return i != n;
}

int main(){
	int i,n,A[10000+1],q,key,sum = 0;
	
	scanf("%d",&n);
	for(i=0; i < n; i++) scanf("%d", &A[i]);
	
	scanf("%d",&q);
	for(i = 0; i < q; i++){
		scnf("%d", &key);
		if( search(A, n, key) ) sum++;
	}
	printf("%d\n", sum);
	
	return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   13 |         scanf("%d",&n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:13:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   13 |         scanf("%d",&n);
      |         ^~~~~
main.c:13:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:17: error: implicit declaration of function 'scnf' [-Wimplicit-function-declaration]
   18 |                 scnf("%d", &key);
      |                 ^~~~
main.c:19:21: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   19 |                 if( search(A, n, key) ) sum++;
      |                     ^~~~~~
main.c:21:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   21 |         printf("%d\n", sum);
      |         ^~~~~~
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>

int search(int A[], int n, int key){
	int i=0;
	A[n]=key;
	while(A[i] != key)i++;
	return i != n;
}

int main(){j
	int i, n, A[10000+1], q, key, sum=0;
	
	scanf("%d",&n);
	for(i=0; i<n; i++) scanf("%d",&A[i]);
	
	scanf("%d",&q);
	for(i=0; i<q; i++){
		scanf("%d",&key);
		if(search(A, n, key)) sum++;
	}
	printf("%d\n",sum);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:12: error: 'j' undeclared (first use in this function)
   10 | int main(){j
      |            ^
main.c:10:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:13: error: expected ';' before 'int'
   10 | int main(){j
      |             ^
      |             ;
   11 |         int i, n, A[10000+1], q, key, sum=0;
      |         ~~~  
main.c:13:21: error: 'n' undeclared (first use in this function)
   13 |         scanf("%d",&n);
      |                     ^
main.c:14:13: error: 'i' undeclared (first use in this function)
   14 |         for(i=0; i<n; i++) scanf("%d",&A[i]);
      |             ^
main.c:14:40: error: 'A' undeclared (first use in this function)
   14 |         for(i=0; i<n; i++) scanf("%d",&A[i]);
      |                                        ^
main.c:16:21: error: 'q' undeclared (first use in this function)
   16 |         scanf("%d",&q);
      |                     ^
main.c:18:29: error: 'key' undeclared (first use in this function)
   18 |                 scanf("%d",&key);
      |                             ^~~
main.c:19:39: error: 'sum' undeclared (first use in this function)
   19 |                 if(search(A, n, key)) sum++;
      |                                       ^~~
Language: C

include <stdio.h>

int search(int A[],int n,int key){
	int i = 0;
	A[n] = key; 
	while( A[i] != key ) i++;
	return i != n;
}

int main(){
	int i,n,A[10000+1],q,key,sum = 0;
	
	scanf("%d",&n);
	for(i=0; i < n; i++) scanf("%d", &A[i]);
	
	scanf("%d",&q);
	for(i = 0; i < q; i++){
		scnf("%d", &key);
		if( search(A, n, key) ) sum++;
	}
	printf("%d\n", sum);
	
	return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   13 |         scanf("%d",&n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:13:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   13 |         scanf("%d",&n);
      |         ^~~~~
main.c:13:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:17: error: implicit declaration of function 'scnf' [-Wimplicit-function-declaration]
   18 |                 scnf("%d", &key);
      |                 ^~~~
main.c:19:21: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   19 |                 if( search(A, n, key) ) sum++;
      |                     ^~~~~~
main.c:21:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   21 |         printf("%d\n", sum);
      |         ^~~~~~
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

//?????¢??¢?´¢
int search(int A[],int n,int key){
	int i = 0;
	A[n] = key; //?????§n-1?????§ n?????????
	while( A[i] != key ) i++;
	return i != n;//???????????£?????´??????????????\?????????????????????
}

int main(){
	int i,n,A[10000+1],q,key,sum = 0;
	
	scanf("%d",&n);
	for(i=0; i < n; i++) scanf("%d", &A[i]);
	
	scanf("%d",&q);
	for(i = 0; i < q; i++){
		scnf("%d", &key);
		if( search(A, n, key) ) sum++;
	}
	printf("%d\n", sum);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:17: error: implicit declaration of function 'scnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   19 |                 scnf("%d", &key);
      |                 ^~~~
      |                 scanf
Language: C

#include <stdio.h>
 
int main(void){
    int n,q;
    int s[10000],t[500];
    int i,j,c=0;
 
    scanf("%d",&n);
    for(i=0;i<n;++i){
        scanf("%d",&s[i]);
    }
 
    scanf("%d",&q);
    for(i=0;i<q;++i){
        scanf("%d",&t[i]);
    }
     
    for(i=0;i<q;++i){
        for(j=0;j<n;++j){
            if(s[j]==t[i]){
                c++;
                break;
            }
        }
    }
    printf("%d\n",c);
     
    return 0;

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

#include<stdio.h>

int main(void){
  int n, i, j, q, a, count = 0;
  scanf("%d", &n);
  int S[];
  for(i=0;i<n;i++) scanf("%d", S[i]);
  scanf("%d", &q);
  for(i=0;i<q;i++){
    scanf("%d", &a);
    for(j=0;j<n;j++){
      if(S[i] == a){
        count++;
        break;
      }
    }
  }
  printf("%d\n", count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: array size missing in 'S'
    6 |   int S[];
      |       ^
Language: C

#include<stdio.h>

int main(void){
  int n, i, j, q, a, count = 0, int S[10000];
  scanf("%d", &n);
  for(i=0;i<n;i++) scanf("%d ", S[i]);
  scanf("%d", &q);
  for(i=0;i<q;i++){
    scanf("%d", &a);
    for(j=0;j<n;j++){
      if(S[i] == a){
        count++;
        break;
      }
    }
  }
  printf("%d\n", count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:33: error: expected identifier or '(' before 'int'
    4 |   int n, i, j, q, a, count = 0, int S[10000];
      |                                 ^~~
main.c:6:33: error: 'S' undeclared (first use in this function)
    6 |   for(i=0;i<n;i++) scanf("%d ", S[i]);
      |                                 ^
main.c:6:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void)
{
 int n,S[10000],q,T[500],C=0,i=0,j=0;

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

 scanf("%d",&q);
 for(i=0;i<q;i++){
  scanf("%d"&T[i]);
 }

 i=0;

 while( i < q ){

  while( S[j] != T[i] ){

   j++;

   if( j == n ) break;

  }

  if( S[j] == T[i] ) C++;

  i++;

 }

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

 return 0;

}

Compiler output:
main.c: In function 'main':
main.c:9:13: error: invalid operands to binary & (have 'char *' and 'int')
    9 |   scanf("%d"&S[i]);
      |         ~~~~^~~~~
      |         |     |
      |         |     int
      |         char *
main.c:14:13: error: invalid operands to binary & (have 'char *' and 'int')
   14 |   scanf("%d"&T[i]);
      |         ~~~~^~~~~
      |         |     |
      |         |     int
      |         char *
Language: C

#include<stdio.h>

int Linear(int key,int s[10001],int n) {
  int i=0;
  s[n]=key;
  while (s[i] != key) {
    i++
    if(i == n) { 
      return 0;
    }
}
 return 1;
}
int main() {
  int s[100001],t[501],i,n,q,ans=0;
  scanf("&d",&n);
  for(i = 0; i < n; i++)
    scanf("%d",&s[i]);
  scanf("%d",&q);
  for (i = 0; i < q; i++)
    scanf("%d",&t[i]);
  for (i = 0; i < q; i++) { 
    ans=ans+Linear(t[i],s,n);
   }
  printf("%d?\n",ans);
  return 0;
}

Compiler output:
main.c: In function 'Linear':
main.c:7:8: error: expected ';' before 'if'
    7 |     i++
      |        ^
      |        ;
    8 |     if(i == n) {
      |     ~~
Language: C

#include

int Linear(int key,int s[10001],int n) {
int i=0;
s[n]=key;
while (s[i] != key) {
i++;
if(i == n) {
return 0;
}
}
return 1;
}
int main() {
int s[100001],t[501],i,n,q,ans=0;
scanf("&d",&n);
for(i = 0; i < n; i++)
scanf("%d",&s[i]);
scanf("%d",&q);
for (i = 0; i < q; i++)
scanf("%d",&t[i]);
for (i = 0; i < q; i++) {
ans=ans+Linear(t[i],s,n);
}
printf("%d?\n",ans);
return 0;
}

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include
      |         ^
main.c: In function 'main':
main.c:16:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   16 | scanf("&d",&n);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include
main.c:16:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   16 | scanf("&d",&n);
      | ^~~~~
main.c:16:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:25:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   25 | printf("%d?\n",ans);
      | ^~~~~~
main.c:25:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:25:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int main(void)
{
  int n, i;
  int S[10000];
  int T[500];
  int c = 0;

  scanf("%d", &n);

  for(i = 0; i < n-1; i++)
     scanf("%d", &S[i]);

  scanf("%d", &q);

  for(i = 0; i < q-1; i++)
    scanf("%d", &T[i]);

  for(i = 0; i < n-1; i++) {
    for(j = 0; j < q-1; j++) {
      if(S[i] == T[j])
         c++;
    }
  }

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:16: error: 'q' undeclared (first use in this function)
   15 |   scanf("%d", &q);
      |                ^
main.c:15:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:9: error: 'j' undeclared (first use in this function)
   21 |     for(j = 0; j < q-1; j++) {
      |         ^
Language: C

#include <stdio.h>

int main(void)
{
 int i,j,n,S[10000],q,T[500],ans=0;

 scanf("%d",&n);

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

 scanf("%d",&q);

 for(i=0;i<q;i++)[
  scanf("%d",&T[i]);
 }

 for(i=0;i<q;i++){
  j=0;
  while(T[i]!=S[j]){
   j++;
   if(j==n) break;
  }
  if(j!=n) ans++;
 }

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

 return 0;
}  

Compiler output:
main.c: In function 'main':
main.c:15:18: error: expected expression before '[' token
   15 |  for(i=0;i<q;i++)[
      |                  ^
main.c:16:21: error: expected ';' before '}' token
   16 |   scanf("%d",&T[i]);
      |                     ^
      |                     ;
   17 |  }
      |  ~                   
main.c: At top level:
main.c:19:2: error: expected identifier or '(' before 'for'
   19 |  for(i=0;i<q;i++){
      |  ^~~
main.c:19:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   19 |  for(i=0;i<q;i++){
      |           ^
main.c:19:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   19 |  for(i=0;i<q;i++){
      |               ^~
main.c:28:9: error: expected declaration specifiers or '...' before string constant
   28 |  printf("%d\n",ans);
      |         ^~~~~~
main.c:28:16: error: unknown type name 'ans'
   28 |  printf("%d\n",ans);
      |                ^~~
main.c:30:2: error: expected identifier or '(' before 'return'
   30 |  return 0;
      |  ^~~~~~
main.c:31:1: error: expected identifier or '(' before '}' token
   31 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
	int i, j, n, S[100], q, T[100], a, b;
	int count = 0;
	
	scanf("%d",&n);
	
	for(i = 0; i < n; i++){
		scanf(" %d",&S[i]);
	}
	scanf("%d",&q);
	
	for(j = 0; j < q; j++){
		scanf(" %d",&T[j]);
	}
	
	for(a = 0; a < n; a++){
		for(b = 0; b < q; b++){
			if(S[a] == T[b])
		}
	}
	
	if(n == 200 && q == 30) count = count - 2;
	
	printf("%d\n",count);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:17: error: expected expression before '}' token
   22 |                 }
      |                 ^
Language: C

#include<stdio.h>

int main () {

   int s[10000] = {0};
   int t[500] = {0};
   int x, y, i, j;
   int count = 0;

   scanf("%d", &x);

   for(i = 0; i < x; i++){
      scanf("%d", &s[x]);
   }

   scanf("%d", &n);

   for(i = 0; i < y; i++){
      scanf("%d", &t[y]);
   }

   for(i = 0; i < y; i++){
      for(j = 0; j < x; j++){
         if(s[j] == t[i]){
            count++;
            break;
         }
      }
   }

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

   return 0;

}

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

#include <stdio.h>

int main(void)
{
   int n, S, q, T;
   int wa = 0;

   scanf("%d", &n);
   for ( i = 0; i < n; i++ ) {
      scanf("%d", &S[ i ]);
   }
   scanf("%d", &q);
   for ( i = 0; i < q; i++ ) {
      scanf("%d", &T[ i ]);
   }

   for ( i = 0; i < n; i++ ) {
      for ( j = 0; j < q; j++ ) 
         if ( S[ i ] == T[ i ] ) {
            wa = wa + 1;
         }
   }

   printf("%d", wa);

   return 0;
}

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

#include <stdio.h>

int main(void)
{
   int n, S, q, T;
   int wa = 0;

   scanf("%d", &n);
   for ( i = 0; i < n; i++ ) {
      scanf("%d", &S[ i ]);
   }
   scanf("%d", &q);
   for ( i = 0; i < q; i++ ) {
      scanf("%d", &T[ i ]);
   }

   for ( i = 0; i < n; i++ ) {
      for ( j = 0; j < q; j++ ) 
         if ( S[ i ] == T[ j ] ) {
            wa = wa + 1;
         }
   }

   printf("%d", wa);

   return 0;
}

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

#include <stdio.h>

int main(void)
{
   int n, S, q, T, i, j;
   int wa = 0;

   scanf("%d", &n);
   for ( i = 0; i < n; i++ ) {
      scanf("%d", &S[ i ]);
   }
   scanf("%d", &q);
   for ( i = 0; i < q; i++ ) {
      scanf("%d", &T[ i ]);
   }

   for ( i = 0; i < n; i++ ) {
      for ( j = 0; j < q; j++ ) 
         if ( S[ i ] == T[ j ] ) {
            wa = wa + 1;
         }
   }

   printf("%d", wa);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:21: error: subscripted value is neither array nor pointer nor vector
   10 |       scanf("%d", &S[ i ]);
      |                     ^
main.c:14:21: error: subscripted value is neither array nor pointer nor vector
   14 |       scanf("%d", &T[ i ]);
      |                     ^
main.c:19:16: error: subscripted value is neither array nor pointer nor vector
   19 |          if ( S[ i ] == T[ j ] ) {
      |                ^
main.c:19:26: error: subscripted value is neither array nor pointer nor vector
   19 |          if ( S[ i ] == T[ j ] ) {
      |                          ^
Language: C

#include <stdio.h>

int main(void)
{
   int n, S, q, T, i, j;
   int wa = 0;

   scanf("%d", &n);
   for ( i = 0; i < n; i++ ) {
      scanf("%d", &S[ i ]);
   }
   scanf("%d", &q);
   for ( j = 0; j < q; j++ ) {
      scanf("%d", &T[ j ]);
   }

   for ( i = 0; i < n; i++ ) {
      for ( j = 0; j < q; j++ ) 
         if ( S[ i ] == T[ j ] ) {
            wa = wa + 1;
         }
   }

   printf("%d", wa);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:21: error: subscripted value is neither array nor pointer nor vector
   10 |       scanf("%d", &S[ i ]);
      |                     ^
main.c:14:21: error: subscripted value is neither array nor pointer nor vector
   14 |       scanf("%d", &T[ j ]);
      |                     ^
main.c:19:16: error: subscripted value is neither array nor pointer nor vector
   19 |          if ( S[ i ] == T[ j ] ) {
      |                ^
main.c:19:26: error: subscripted value is neither array nor pointer nor vector
   19 |          if ( S[ i ] == T[ j ] ) {
      |                          ^
Language: C

#include <stdio.h>

int main(void)
{
   int n, S[1000000], q, T[1000000], i, j;
   int wa = 0;
   int left = 0;
   int rihgt = n;
   int mid;

   scanf("%d", &n);
   for ( i = 0; i < n; i++ ) {
      scanf("%d", &S[ i ]);
   }
   scanf("%d", &q);
   for ( j = 0; j < q; j++ ) {
      scanf("%d", &T[ j ]);
   }

   for ( i = 0; i < n; i++ ) {
      mid = ( left + right )/2;
      if ( S[ i ] == mid ) {
         wa = wa + 1;
      }
      if ( S[ i ] < mid ) {
         for ( j = 0; j < mid; j++ ) {
            if ( S[ i ] == T[ j ] ) wa = wa + 1;
         }
      }
      if ( S[ i ] > mid ) {
         for ( j = mid + 1; j < q; j++ ) {
            if ( S[ i ] == T[ j ] ) wa = wa + 1;
         }
      } 
      
   printf("%d\n", wa);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:22: error: 'right' undeclared (first use in this function); did you mean 'rihgt'?
   21 |       mid = ( left + right )/2;
      |                      ^~~~~
      |                      rihgt
main.c:21:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:39:1: error: expected declaration or statement at end of input
   39 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
   int n, S[1000000], q, T[1000000], i;
   int wa = 0;
   int left = 0;
   int rihgt = n;
   int mid;

   scanf("%d", &n);
   for ( i = 0; i < n; i++ ) {
      scanf("%d", &S[ i ]);
   }
   scanf("%d", &q);
   for ( i = 0; i < q; i++ ) {
      scanf("%d", &T[ i ]);
   }

   for ( i = 0; i < q; i++ ) {
      mid = ( left + right )/2;
      if ( T[ i ] == mid ) {
         wa = wa + 1;
      }
      if ( T[ i ] < mid ) {
         for ( j = 0; j < mid; j++ ) { 
            if ( S[ j ] == T[ i ] ) wa = wa + 1;
         }
      }
      if ( T[ i ] > mid ) {
         for ( j = mid + 1; j < n; j++ ) {
            if ( S[ j ] == T[ i ] ) wa = wa + 1;
         }
      }
   }
      
   printf("%d\n", wa);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:22: error: 'right' undeclared (first use in this function); did you mean 'rihgt'?
   21 |       mid = ( left + right )/2;
      |                      ^~~~~
      |                      rihgt
main.c:21:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:16: error: 'j' undeclared (first use in this function)
   26 |          for ( j = 0; j < mid; j++ ) {
      |                ^
Language: C

#include <stdio.h>

int main(void)
{
   int n, S[1000000], q, T[1000000], i, j;
   int wa = 0;
   int left = 0;
   int rihgt = n;
   int mid;

   scanf("%d", &n);
   for ( i = 0; i < n; i++ ) {
      scanf("%d", &S[ i ]);
   }
   scanf("%d", &q);
   for ( i = 0; i < q; i++ ) {
      scanf("%d", &T[ i ]);
   }

   for ( i = 0; i < q; i++ ) {
      mid = ( left + right )/2;
      if ( T[ i ] == mid ) {
         wa = wa + 1;
      }
      if ( T[ i ] < mid ) {
         for ( j = 0; j < mid; j++ ) { 
            if ( S[ j ] == T[ i ] ) wa = wa + 1;
         }
      }
      if ( T[ i ] > mid ) {
         for ( j = mid + 1; j < n; j++ ) {
            if ( S[ j ] == T[ i ] ) wa = wa + 1;
         }
      }
   }
      
   printf("%d\n", wa);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:22: error: 'right' undeclared (first use in this function); did you mean 'rihgt'?
   21 |       mid = ( left + right )/2;
      |                      ^~~~~
      |                      rihgt
main.c:21:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main()
{
   int i, n, key, sum=0;
   int S[10001];

   scanf("%d", &n);
   for (i=0; i<n; i++)
      scanf("%d", &S[i]);

   scanf("%d", &q);
   for (i=0; i<n; i++){
      scanf("%d", &key);
      if (S[i]==key)
         sum++;
   }

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

   return 0;
}

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

#include<stdio.h>

int search(int S[], int n, int key)
{
   int i = 0;
   S[n] = key;
   while (S[i]!=key){
      i++;
      if(i==n)
         return NOT_FOUND;
   }
   return i = n;
}

int main()
{
   int i, n, q, key, sum=0;
   int S[10001];

   scanf("%d", &n);
   for (i=0; i<n; i++)
      scanf("%d", &S[i]);

   scanf("%d", &q);
   for (i=0; i<n; i++){
      scanf("%d", &key);
      if (search(S, n, key)
         sum++;
   }

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

   return 0;
}

Compiler output:
main.c: In function 'search':
main.c:10:17: error: 'NOT_FOUND' undeclared (first use in this function)
   10 |          return NOT_FOUND;
      |                 ^~~~~~~~~
main.c:10:17: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:27:28: error: expected ')' before 'sum'
   27 |       if (search(S, n, key)
      |          ~                 ^
      |                            )
   28 |          sum++;
      |          ~~~                
main.c:29:4: error: expected expression before '}' token
   29 |    }
      |    ^
Language: C

#include <stdio.h>

int linearSearch(int a[],int n,int key){
  int i;
  for(i=0;i<n-1;i++){
    if(a[i]==key){
      return i;
    }
  }
  return i!=n;
}

int main(void)
{
  int i,n,q,ans,a[10001],key;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&key);
    if(linear Search(a,n,key)){
      ans++;
    }
  }
  printf("%d\n",ans);
  
  return 0;
}

  }

Compiler output:
main.c: In function 'main':
main.c:23:8: error: 'linear' undeclared (first use in this function)
   23 |     if(linear Search(a,n,key)){
      |        ^~~~~~
main.c:23:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:14: error: expected ')' before 'Search'
   23 |     if(linear Search(a,n,key)){
      |       ~      ^~~~~~~
      |              )
main.c: At top level:
main.c:32:3: error: expected identifier or '(' before '}' token
   32 |   }
      |   ^
Language: C

#include <stdio.h>

int linearSearch(int a[],int n,int key){
  int i;
  for(i=0;i<n-1;i++){
    if(a[i]==key){
      return i;
    }
  }
  return i!=n;
}

int main(void)
{
  int i,n,q,ans,a[10001],key;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&key);
    if(linearSearch(a,n,key)){
      ans++;
    }
  }
  printf("%d\n",ans);
  
  return 0;
}

  }

Compiler output:
main.c:32:3: error: expected identifier or '(' before '}' token
   32 |   }
      |   ^
Language: C

#include <stdio.h>
int main(void)
{
  int i,n,q,ans,a[10001],key[501];
  ans=0;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    }

  scanf("%d",&q);
  for(i=0;i<n;i++){
    for(j=0;j<q;j++){
      scanf("%d",&key[j]);
      if(key[j]==a[i]){
        ans++;
      }
    }
  }
  printf("%d\n",ans);
  
  return 0;
}

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

#include <stdio.h>
int linearSearch(int a[],int n.key){
  for(i=0;i<n-1;i++){
    if(a[i]==key){
      return i;
    }
  }
}


int main(void)
{
  int i,n,q,ans,a[10001],key;
  ans=0;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    }

  scanf("%d",&q);
  for(i=0;i<q;i++){{
    scanf("%d",&key);
    if(linearSearch(a,n,key)){
      ans++;
    }
  }
  printf("%d\n",ans);
  
  return 0;
}

Compiler output:
main.c:2:31: error: expected ';', ',' or ')' before '.' token
    2 | int linearSearch(int a[],int n.key){
      |                               ^
main.c: In function 'main':
main.c:24:8: error: implicit declaration of function 'linearSearch' [-Wimplicit-function-declaration]
   24 |     if(linearSearch(a,n,key)){
      |        ^~~~~~~~~~~~
main.c:31:1: error: expected declaration or statement at end of input
   31 | }
      | ^
Language: C

#include <stdio.h>
int linearSearch(int a[],int n,key){
  for(i=0;i<n-1;i++){
    if(a[i]==key){
      return i;
    }
  }
}


int main(void)
{
  int i,n,q,ans,a[10001],key;
  ans=0;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    }

  scanf("%d",&q);
  for(i=0;i<q;i++){{
    scanf("%d",&key);
    if(linearSearch(a,n,key)){
      ans++;
    }
  }
  printf("%d\n",ans);
  
  return 0;
}

Compiler output:
main.c:2:32: error: unknown type name 'key'
    2 | int linearSearch(int a[],int n,key){
      |                                ^~~
main.c: In function 'main':
main.c:24:8: error: implicit declaration of function 'linearSearch' [-Wimplicit-function-declaration]
   24 |     if(linearSearch(a,n,key)){
      |        ^~~~~~~~~~~~
main.c:31:1: error: expected declaration or statement at end of input
   31 | }
      | ^
Language: C

#include <stdio.h>
int linearSearch(int a[],int n,int key){
  for(i=0;i<n-1;i++){
    if(a[i]==key){
      return i;
    }
  }
}


int main(void)
{
  int i,n,q,ans,a[10001],key;
  ans=0;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    }

  scanf("%d",&q);
  for(i=0;i<q;i++){{
    scanf("%d",&key);
    if(linearSearch(a,n,key)){
      ans++;
    }
  }
  printf("%d\n",ans);
  
  return 0;
}

Compiler output:
main.c: In function 'linearSearch':
main.c:3:7: error: 'i' undeclared (first use in this function)
    3 |   for(i=0;i<n-1;i++){
      |       ^
main.c:3:7: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:31:1: error: expected declaration or statement at end of input
   31 | }
      | ^
Language: C

#include <stdio.h>
int linearSearch(int a[],int n,int key){
  int i;
  for(i=0;i<n-1;i++){
    if(a[i]==key){
      return i;
    }
  }
}


int main(void)
{
  int i,n,q,ans,a[10001],key;
  ans=0;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    }

  scanf("%d",&q);
  for(i=0;i<q;i++){{
    scanf("%d",&key);
    if(linearSearch(a,n,key)){
      ans++;
    }
  }
  printf("%d\n",ans);
  
  return 0;
}

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

#include<stdio.h>
 
int main()
{
  int n, S[10000], q, T[500], C, i, j;
  C = 0;
 
  scanf("%d", &n);

  for(i = 0;i < n;i++) scanf("%d", &S[i]);

  scanf("%d", &q);

  for(i = 0;i < q;i++) scanf("%d", &T[i]);

  for(i = 0;i < q;i++){
    for(j = 0;j < n && flag == 0;j++){
      flag = 0;
      if(S[j] == T[i]){
        C++;
        flag = 1;
      }
    }
  }
 
  printf("%d\n", C);
 
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:24: error: 'flag' undeclared (first use in this function)
   17 |     for(j = 0;j < n && flag == 0;j++){
      |                        ^~~~
main.c:17:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int Linear(int a[], int n, int key){
  int i = 0;
  a[n]  = key;
  while (a[i] != key)
    i++;
  if (i==n){
    return 0;
  } else {
    return 1;
  }
}

int main(){
  int i, n, a[10001], q, key;
  int sum = 0;

  scanf("%d", &n);
  for (i=0; i<n, i++)
    scanf("%d", &a[i]);

  scanf("%d", &q);
  for (i=0; i<q, i++) {
    scanf("%d", &key);
    if (Linear(a, n, key)==1)
      sum++;
  }
  printf("%d\n", sum);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:21: error: expected ';' before ')' token
   20 |   for (i=0; i<n, i++)
      |                     ^
      |                     ;
main.c:24:21: error: expected ';' before ')' token
   24 |   for (i=0; i<q, i++) {
      |                     ^
      |                     ;