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

#include<bits/stdc++.h>
using namespace std;
int main(){
    string p,s;
    cin>>p>>s;
    p=p+p;
    bool flag=false;
    for(int i=0;i<(int)p.size()-(int)s.size()+1;i++){
        string t=p.substr(i,s.size());
        if(t==s){
            flag=true;
            break;
        }  
    }
    cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
    
}


Compiler output:
a.cc:16:6: error: expected unqualified-id before 'else'
   16 |     }else{
      |      ^~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
    string circle,str;
    getline(cin,circle);
    getline(cin,str);
    int circle_pointer=0;
    int str_pointer=0;
    bool tmp= true;
    for(int i=0;i<circle.length();i++)
    {
        if(circle[i]==str[0]){
            circle_pointer=i;
            str_pointer=0;
            tmp=true;
            while (tmp&&str_pointer<str.length()-1) {
                str_pointer++;
                if (circle_pointer < circle.length() - 1)
                    circle_pointer++;
                else
                    circle_pointer = 0;
                tmp=(str[str_pointer]==circle[circle_pointer]);
            }
        }
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:27:6: error: expected '}' at end of input
   27 |     }
      |      ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s,p;
  cin>>s>>p;
  s=s+s;
  /*cout<<s<<endl;*/
  bool flag = false;
  for(int i=0;i<(int)s.size()-(int)p.size()+1;i++){
    string t=p.substr(i,p.size() );

    if(t==p){
      flag=true;
      break;
    }
  }
  if(flag){
    cout<<"yes"<<endl;
  }else{
    cout<<"no"<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:21:4: error: expected '}' at end of input
   21 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
    int i,len;
    char s[4096]、p[4096],s2[4096];
    scanf("%s",s);
    scanf("%s",p);
    sprintf(s2,"%s%s",s,s);
    puts(strstr(s,p)==NULL?"No":"Yes");
printf("%s\n",s2);
    return 0;
}



Compiler output:
a.cc:6:17: error: extended character 、 is not valid in an identifier
    6 |     char s[4096]、p[4096],s2[4096];
      |                 ^
a.cc: In function 'int main()':
a.cc:6:17: error: expected initializer before '\U00003001p'
    6 |     char s[4096]、p[4096],s2[4096];
      |                 ^~~
a.cc:7:16: error: 's' was not declared in this scope
    7 |     scanf("%s",s);
      |                ^
a.cc:8:16: error: 'p' was not declared in this scope
    8 |     scanf("%s",p);
      |                ^
a.cc:9:13: error: 's2' was not declared in this scope
    9 |     sprintf(s2,"%s%s",s,s);
      |             ^~
Language: C++

#include <stdio.h>
#include <string.h>
int main(void){
    int i, len;
    char s[4096],p[4096],s2[4096];
    scanf("%s",s);
    scanf("%s",p);
    sprintf(s2,"%s%s",s,s);
    len=strstr(s2,p);
    if(len){
    puts("Yes");
}else{
    puts("No");
}   
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: invalid conversion from 'char*' to 'int' [-fpermissive]
    9 |     len=strstr(s2,p);
      |         ~~~~~~^~~~~~
      |               |
      |               char*
Language: C++

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

int main() {
    int i, len;
    char s[4096], p[4096], s2[4096];
    cin >> s;
    cin >> p;
    
    sprintf(s2, "%s%s", s, s);
    printf("%s\n", s2);

    if(strstr(s2, p) < 0) {
		cout << No << endl;
    }
    else cout << Yes << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: ordered comparison of pointer with integer zero ('char*' and 'int')
   14 |     if(strstr(s2, p) < 0) {
      |        ~~~~~~~~~~~~~~^~~
a.cc:15:25: error: 'No' was not declared in this scope
   15 |                 cout << No << endl;
      |                         ^~
a.cc:17:18: error: 'Yes' was not declared in this scope
   17 |     else cout << Yes << endl;
      |                  ^~~
Language: C++

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

int main() {
    int i, len;
    char s[4096], p[4096], s2[4096];
    cin >> s;
    cin >> p;
    
    sprintf(s2, "%s%s", s, s);
    printf("%s\n", s2);

    if(strstr(s2, p) < 0) {
	cout << "No" << endl;
    }
    else cout << "Yes" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: ordered comparison of pointer with integer zero ('char*' and 'int')
   14 |     if(strstr(s2, p) < 0) {
      |        ~~~~~~~~~~~~~~^~~
Language: C++

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

int main() {
    int i, len;
    char s[4096], p[4096], s2[4096];
    cin >> s;
    cin >> p;
    
    sprintf(s2, "%s%s", s, s);

    if(strstr(s2, p) < 0) {
	cout << "No" << endl;
    }
    else cout << "Yes" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: ordered comparison of pointer with integer zero ('char*' and 'int')
   13 |     if(strstr(s2, p) < 0) {
      |        ~~~~~~~~~~~~~~^~~
Language: Java

import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String w = sc.nextInt();
        int count = 0;
        String t;
        while (!((t = sc.next).equals("END_OF_TEXT"))) {
            if(t.toLowerCase().equals(w))
                count++
        }
    }
}


Compiler output:
Main.java:11: error: ';' expected
                count++
                       ^
1 error
Language: Java

import java.util.*;

class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String w = sc.nextInt();
        int count = 0;
        String t;
        while (!((t = sc.next).equals("END_OF_TEXT"))) {
            if(t.toLowerCase().equals(w))
                count++;
        }
    }
}


Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to String
        String w = sc.nextInt();
                             ^
Main.java:9: error: cannot find symbol
        while (!((t = sc.next).equals("END_OF_TEXT"))) {
                        ^
  symbol:   variable next
  location: variable sc of type Scanner
2 errors
Language: Java

import java.util.Scanner;

public class Aim {

	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int count = 0;
        String w, t;
        w = sc.next();
        do{
        	t = sc.next();
        	if(t.contains(w)) count++;
        }while(!t.contains("END_OF_TEXT")) ;
        System.out.println(count);
        sc.close();
    }
}


Compiler output:
Main.java:3: error: class Aim is public, should be declared in a file named Aim.java
public class Aim {
       ^
1 error
Language: Java

import java.util.Scanner;
public class MyClass {
    public static void main(String[] args) throws Exception {
         
        Scanner sc = new Scanner(System.in);
        
        	String W = sc.next();
        	W = W.toLowerCase();
            String T;
        	int count = 0;
        
        while(true){
            
            T = sc.next();
            
            if(T.equals("END_OF_TEXT")) break;
            
            T = T.toLowerCase();
            
            if (T.equals(W)) {
                        count++;
                }
        }
                        System.out.println(count);
        sc.close();
    }
}


Compiler output:
Main.java:2: error: class MyClass is public, should be declared in a file named MyClass.java
public class MyClass {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;


class Main{
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		//BufferedReader br = new BufferedReader(new FileReader("sample.txt"));
		
		
		String str;
		String x=br.readLine();
		int count=0;
		for(;!(str=br.readLine()).equals("END_OF_TEXT"));){
			String[] stg=str.split(" ");
			for(String i:stg){
				if(i.equalsIgnoreCase(x))count++;
			}
		}System.out.println(count);
		}
		
		}

Compiler output:
Main.java:18: error: ';' expected
		for(;!(str=br.readLine()).equals("END_OF_TEXT"));){
		                                               ^
Main.java:18: error: illegal start of expression
		for(;!(str=br.readLine()).equals("END_OF_TEXT"));){
		                                                 ^
2 errors
Language: Java

//????????????
/*
?????????????????????
*/
#if 0
?????????????????????
#endif

Compiler output:
Main.java:5: error: illegal character: '#'
#if 0
^
Main.java:5: error: class, interface, enum, or record expected
#if 0
    ^
Main.java:7: error: illegal character: '#'
#endif
^
3 errors
Language: Java

import java.io.*;
 
public class Main {
 
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String w = br.readLine();
        String t = "";
        int count = 0;
        while(!(line = br.readLine()).equals("END_OF_TEXT")){
            t.toLowerCase();
            String[] words = t.split(" ");
            for(int i=0; i < words.length; i++){
                if(words[i].equals(w)){
                    count++;
                }
            }
        }
        System.out.println(count);
    }
 
}

Compiler output:
Main.java:10: error: cannot find symbol
        while(!(line = br.readLine()).equals("END_OF_TEXT")){
                ^
  symbol:   variable line
  location: class Main
1 error
Language: Java

class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		Scanner scan = new Scanner(System.in);

		String str1 = br.readLine();

		String str2;

		int count =0;

		StringBuilder buildrer = new StringBuilder();

		while (!((str2 = scan.next()).equals("END_OF_TEXT"))) {
				if(str1.equalsIgnoreCase(str2)){
					/*System.out.println(str1);*/
					count++;
				}
		}

		System.out.println(count);
 }

}

Compiler output:
Main.java:3: error: cannot find symbol
	public static void main(String[] args) throws IOException {
	                                              ^
  symbol:   class IOException
  location: class Main
Main.java:5: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:7: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		                   ^
  symbol:   class Scanner
  location: class Main
6 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;


class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		Scanner scan = new Scanner(System.in);

		String str1 = br.readLine();

		String str2;

		int count =0;

		StringBuilder buildrer = new StringBuilder();



		while (true) {
			if((str2 = scan.nextLine()).equals("END_OF_TEXT")){
				break;
			}

				if(str1.equalsIgnoreCase(str2)){
					/*System.out.println(str1);*/
					count++;
				}
		}

		System.out.println(count);
 }

Compiler output:
Main.java:37: error: reached end of file while parsing
 }
  ^
1 error
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);

		String w = sc.nextLine();

		int count =0;
		while (true) {
			String ti = sc.next();
			if ( ti.equals("END_OF_TEXT") ) break;
			if ( ti.equalsIgnoreCase(w) ) count++;
		}
		System.out.println(count);
	}

}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);

		String w = sc.nextLine();


		int count =0;
		while (true) {
			String ti = sc.next();
			if ( ti.equals("END_OF_TEXT") ) break;
			if ( ti.equalsIgnoreCase(w) ) count++;
		}
		System.out.println(count);
	}

}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		String W = scan.next();
		int cnt = 0;
		for(;;){
			String T = scan.next();
			if(T.equals(END_OF_TEXT)){
				break;
			} else{
				if(T.equals(W)){
					cnt++;
				}
			}
		}
		System.out.println(cnt);
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
			if(T.equals(END_OF_TEXT)){
			            ^
  symbol:   variable END_OF_TEXT
  location: class Main
1 error
Language: Java


import java.util.Scanner;


public class Main{

	public class Main {
	    public static void main(String[] args){
	        Scanner sc=new Scanner(System.in);
	        String w=sc.next();
	        int c=0;
	        while(sc.hasNext()){
	            String tem=sc.next();
	            if(tem.equals("END_OF_TEXT")) break;
	            tem=tem.toLowerCase();
	            if(tem.equals(w)){
	                c++;
	            }

	            }
	            System.out.println(c);

	    }
	}

Compiler output:
Main.java:24: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.*;

public class Intro32{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int count = 0;
		String W = scan.next();
		for(;;){
			String T = scan.next();
			if(T.equals("END_OF_TEXT")){
				break;
			}
			String w = W.toLowerCase();
			String t = T.toLowerCase();
			if(t.equals(w)){
				count++;
			}
		}
		System.out.println(count);
	}
}

Compiler output:
Main.java:3: error: class Intro32 is public, should be declared in a file named Intro32.java
public class Intro32{
       ^
1 error
Language: Java


import java.util.Scanner;

public class Main {
    public static void main(String[] args){
    	//
Scanner sc = new Scanner(System.in);
		//
		int count = 0;
	
		while(true){
			String input = sc.nextLine();
			String[] word = input.split(" ");
			//
			if(word[0].equals("END_OF_TEXT")){
				break;
			}
		//
		for(int i = 0; i < word.length; i++){
			word[i] = word[i].toLowerCase();
			
			if(word[i].equals(target)){
				count++;
			}
		}
	}
	System.out.println(count);
    }
}

Compiler output:
Main.java:22: error: cannot find symbol
			if(word[i].equals(target)){
			                  ^
  symbol:   variable target
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String W = line.toUpperCase;

        int count = 0;
        while(!((line = sc.nextLine()).equals("END_OF_TEXT"))) {
          String[] l = line.split(" ");
          for(int i = 0; i < l.length; i++) {
            if(W.equals(l[i].toUpperCase)) {
              count++;
            }
          }
        }

        System.out.println(count);

//        String line = sc.nextLine();
//        char[] W = line.toCharArray(); //word
//
//        int count = 0;
//        while(!((line = sc.nextLine()).equals("END_OF_TEXT"))) {
//          char[] T = line.toCharArray();
//
//          for(int i = 0; i < T.length; i++) {
//            if(Character.toUpperCase(T[i]) == Character.toUpperCase(W[0]) && i + W.length - 1 < T.length) {
//              for(int j = 0; j < W.length; j++) {
//                if(Character.toUpperCase(T[i + j]) != Character.toUpperCase(W[j])) {
//                  break;
//                } else if(j == W.length - 1) {
//                  count++;
//                }
//              }
//            }
//          }
//        }
//
//        System.out.println(count);
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        String W = line.toUpperCase;
                       ^
  symbol:   variable toUpperCase
  location: variable line of type String
Main.java:14: error: cannot find symbol
            if(W.equals(l[i].toUpperCase)) {
                            ^
  symbol:   variable toUpperCase
  location: class String
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
    public static void main(String[] args) throws IOException{
	Scanner scan = new Scanner(System.in);
        BufferedReader br = new BufferedReader(System.in)
        
	    int t = 0;;
        String s = br.readLine();
	while(true){
	    String[] u = br.readLine().split(" ");
	    if(u[]=END_OF_TEXT){break;}
	    for(){
		t++;
            }
        }
    }
}

Compiler output:
Main.java:8: error: ';' expected
        BufferedReader br = new BufferedReader(System.in)
                                                         ^
Main.java:14: error: '.class' expected
	    if(u[]=END_OF_TEXT){break;}
	          ^
Main.java:15: error: illegal start of expression
	    for(){
	        ^
3 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
    public static void main(String[] args) throws IOException{
	Scanner scan = new Scanner(System.in);
        BufferedReader br = new BufferedReader(System.in)
        
	    int t = 0;;
        String s = br.readLine();
	while(true){
	    String[] u = br.readLine().split(" ");
	    if(u[]=END_OF_TEXT){break;}
	       for(u[]!=END_OF_TEXT){
		   t++;
               }
            }
    }System.out.println(t);
    }
}

Compiler output:
Main.java:8: error: ';' expected
        BufferedReader br = new BufferedReader(System.in)
                                                         ^
Main.java:14: error: '.class' expected
	    if(u[]=END_OF_TEXT){break;}
	          ^
Main.java:15: error: not a statement
	       for(u[]!=END_OF_TEXT){
	            ^
Main.java:15: error: ';' expected
	       for(u[]!=END_OF_TEXT){
	              ^
Main.java:15: error: ';' expected
	       for(u[]!=END_OF_TEXT){
	                           ^
Main.java:19: error: <identifier> expected
    }System.out.println(t);
                       ^
Main.java:19: error: <identifier> expected
    }System.out.println(t);
                         ^
Main.java:21: error: class, interface, enum, or record expected
}
^
8 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
    public static void main(String[] args) throws IOException{
	Scanner scan = new Scanner(System.in);
        BufferedReader br = new BufferedReader(System.in)
        
	    int t = 0;;
        String s = br.readLine();
	while(true){
	    String[] u = br.readLine().split(" ");
	    if(u[]=END_OF_TEXT){break;}
	       for(u[]!="END_OF_TEXT"){
		   if(s=u[]){
		       t++;
                   }
               
            }
    }System.out.println(t);
    }
}

Compiler output:
Main.java:8: error: ';' expected
        BufferedReader br = new BufferedReader(System.in)
                                                         ^
Main.java:14: error: '.class' expected
	    if(u[]=END_OF_TEXT){break;}
	          ^
Main.java:15: error: not a statement
	       for(u[]!="END_OF_TEXT"){
	            ^
Main.java:15: error: ';' expected
	       for(u[]!="END_OF_TEXT"){
	              ^
Main.java:15: error: ';' expected
	       for(u[]!="END_OF_TEXT"){
	                             ^
Main.java:16: error: '.class' expected
		   if(s=u[]){
		           ^
6 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
    public static void main(String[] args) throws IOException{
	Scanner scan = new Scanner(System.in);
        BufferedReader br = new BufferedReader(System.in)

	    int t = 0;;
        String s = br.readLine();
	while(true){
	    String[] u = br.readLine().split(" ");
	    if(u[]==END_OF_TEXT){break;}
	       for(u[]!= "END_OF_TEXT"){
		   if(s=u[]){
		       t++;
                   }
               
            }
    }System.out.println(t);
    }
}

Compiler output:
Main.java:8: error: ';' expected
        BufferedReader br = new BufferedReader(System.in)
                                                         ^
Main.java:14: error: '.class' expected
	    if(u[]==END_OF_TEXT){break;}
	          ^
Main.java:15: error: not a statement
	       for(u[]!= "END_OF_TEXT"){
	            ^
Main.java:15: error: ';' expected
	       for(u[]!= "END_OF_TEXT"){
	              ^
Main.java:15: error: ';' expected
	       for(u[]!= "END_OF_TEXT"){
	                              ^
Main.java:16: error: '.class' expected
		   if(s=u[]){
		           ^
6 errors
Language: Java

mport java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
    public static void main(String[] args) throws IOException{
	Scanner scan = new Scanner(System.in);
        BufferedReader br = new BufferedReader(System.in)

	    int t = 0;;
        String s = br.readLine();
	while(true){
	    String[] u = br.readLine().split(" ");
	    if(u[0].equals("END_OF_TEXT")){break;}
	    for(!(u[0].equals( "END_OF_TEXT"))){
		   if(s=u[]){
		       t++;
                   }
               
            }
    }System.out.println(t);
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.io.BufferedReader;
^
Main.java:2: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:8: error: ';' expected
        BufferedReader br = new BufferedReader(System.in)
                                                         ^
Main.java:15: error: not a statement
	    for(!(u[0].equals( "END_OF_TEXT"))){
	        ^
Main.java:15: error: ';' expected
	    for(!(u[0].equals( "END_OF_TEXT"))){
	                                      ^
Main.java:16: error: '.class' expected
		   if(s=u[]){
		           ^
7 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.StringBuilder;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String st = sc.readLine();
	import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.StringBuilder;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String st = sc.readLine();
		String s;
		int count = 0;
		Pattern p = Pattern.compile(st);
		while(true){
			s = sc.readLine().toLowerCase();
			Matcher matcher = p.matcher(s);
			if(s.equals("END_OF_TEXT")){
				break;
			}
			while(matcher.find()){
				count++;
			}
		}
		sb.append(count+"\n");
		System.out.print(sb);
	}
}	String s;
		int count = 0;
		Pattern p = Pattern.compile(st);
		while(true){
			s = sc.readLine().toLowerCase();
			Matcher matcher = p.matcher(s);
			if(s.equals("END_OF_TEXT")){
				break;
			}
			while(matcher.find()){
				count++;
			}
		}
		sb.append(count+"\n");
		System.out.print(sb);
	}
}

Compiler output:
Main.java:11: error: illegal start of expression
	import java.io.BufferedReader;
	^
Main.java:11: error: not a statement
	import java.io.BufferedReader;
	              ^
Main.java:12: error: illegal start of expression
import java.io.InputStreamReader;
^
Main.java:12: error: not a statement
import java.io.InputStreamReader;
              ^
Main.java:13: error: illegal start of expression
import java.lang.StringBuilder;
^
Main.java:13: error: not a statement
import java.lang.StringBuilder;
                ^
Main.java:14: error: illegal start of expression
import java.util.regex.Pattern;
^
Main.java:14: error: not a statement
import java.util.regex.Pattern;
                      ^
Main.java:15: error: illegal start of expression
import java.util.regex.Matcher;
^
Main.java:15: error: not a statement
import java.util.regex.Matcher;
                      ^
Main.java:16: error: illegal start of expression
public class Main {
^
Main.java:40: error: illegal start of type
		while(true){
		^
Main.java:50: error: <identifier> expected
		sb.append(count+"\n");
		         ^
Main.java:50: error: <identifier> expected
		sb.append(count+"\n");
		               ^
Main.java:51: error: <identifier> expected
		System.out.print(sb);
		                ^
Main.java:51: error: <identifier> expected
		System.out.print(sb);
		                   ^
Main.java:53: error: class, interface, enum, or record expected
}
^
17 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = 0;
		String t = " ";
		String w = sc.next();
		while (sc.next().equalsIgnoreCase("END_OF_TEXT")) {
			t += sc.next();
		}
		
		for (int i = 0; i < t.length(); i++) {
			if (t.contains(w)) {
				count++;
			}
		}
		System.out.println(count);
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Main_A{
    public static void main(String[] args) {
        Scanner stdin = new Scanner(System.in);
         
        String w;
        String t;
        int countW;
         
        w = stdin.next();
         
        countW = 0;
        while (true) {
            t = stdin.next();
            if ("END_OF_TEXT".equals(t)) {
                break;
            }
             
            if (w.equals(t) || w.equals(t)) {
                countW++;
            }
        }
         
        System.out.println(countW);
        
        stdin.close();
    }
}

Compiler output:
Main.java:3: error: class Main_A is public, should be declared in a file named Main_A.java
public class Main_A{
       ^
1 error
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String w = sc.nextLine().toLowerCase();
		int count=0;
		
		while(true){
			String[] line = sc.nextLine().toLowerCase().split(" ");
			if(line[0].equals(end_of_text){
				break;
			}
			for(int i=0;i<line.length();i++){
				if(w.equals(line[i]){
					count+=1;
				}
			}
		}
		System.out.println(count);
	}
}	

Compiler output:
Main.java:11: error: ')' expected
			if(line[0].equals(end_of_text){
			                              ^
Main.java:15: error: ')' expected
				if(w.equals(line[i]){
				                    ^
2 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String w = sc.nextLine().toLowerCase();
		int count=0;
		
		while(true){
			String[] line = sc.nextLine().toLowerCase().split(" ");
			if(line[0].equals(end_of_text)){
				break;
			}
			for(int i=0;i<line.length();i++){
				if(w.equals(line[i])){
					count+=1;
				}
			}
		}
		System.out.println(count);
	}
}	

Compiler output:
Main.java:11: error: cannot find symbol
			if(line[0].equals(end_of_text)){
			                  ^
  symbol:   variable end_of_text
  location: class Main
Main.java:14: error: cannot find symbol
			for(int i=0;i<line.length();i++){
			                  ^
  symbol:   method length()
  location: variable line of type String[]
2 errors
Language: Java

import java.util.ArrayList;
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String searchWord = sc.next();
        ArrayList<String> stringArray = new ArrayList<String>();
        String target = "";
        while(true){
            target = sc.next();
            if(target.equals("END_OF_TEXT")) break;
            stringArray.add(target);
        }
        int count = 0;
        for(String str: stringArray){
            if(str.equals(searchWord)){
                count++;
            }
        }
        System.out.println(count);
        }
    }
}


Compiler output:
Main.java:24: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int count;
        String search = sc.next();
        while(true){
            if(search == sc.next()) count++;
            if(sc.next() == "END_OF_TEXT") break;
        }
        System.out.printf("%d\n",count);
    }
}



Compiler output:
Main.java:9: error: variable count might not have been initialized
            if(search == sc.next()) count++;
                                    ^
Main.java:12: error: variable count might not have been initialized
        System.out.printf("%d\n",count);
                                 ^
2 errors
Language: Java

import java.util.Scanner;
public class s9{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String key = sc.nextLine();
        String BRAKEW="END_OF_TEXT";
        int count=0;
        while(true) {
            String str = sc.nextLine();
            str = str.toLowerCase();
            if(str.equals(BRAKEW.toLowerCase()))break;


            if(str.contains(key)) {
            	count++;
            }
        }
        System.out.println(count);
        sc.close();
    }
}


Compiler output:
Main.java:2: error: class s9 is public, should be declared in a file named s9.java
public class s9{
       ^
1 error
Language: Java

package aoj0103;

import java.util.Scanner;


public class AOJ0103 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        String s1 = new String(sc.nextLine());
        String s2 = new String();
        int c=0;
        
        while(true){
        	s2 = sc.next();
        	if(s2.equals("END_OF_TEXT")){
        		sc.close();
        		break;
        	}
        	if(s2.equals(s1)){
        		c++;
        	}
        }
        System.out.println(c);
    }

}


Compiler output:
Main.java:6: error: class AOJ0103 is public, should be declared in a file named AOJ0103.java
public class AOJ0103 {
       ^
1 error
Language: Java

import java.util.Scanner;
import java.util.ArrayList;

public class Ex01FindingAWord {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String W = sc.next();
		String T;
		int count = 0;
		ArrayList<String> lowerT = new ArrayList<String>();
		;
		while (true) {
			T = sc.next();
			if (T.equals("END_OF_TEXT")) {
				break;
			}
			lowerT.add(T.toLowerCase());
		}
		for (int i = 0; i < lowerT.size(); i++) {
			if (W.equals(lowerT.get(i))) {
				count++;
			}
		}
		System.out.println(count);
		sc.close();
	}
}


Compiler output:
Main.java:4: error: class Ex01FindingAWord is public, should be declared in a file named Ex01FindingAWord.java
public class Ex01FindingAWord {
       ^
1 error
Language: Java

import java.util.*;

public class Main {

	public static void main(String[] args) {
		String w, temp;
		int counter = 0;
		Scanner sc = new Scanner(System.in);
		w = sc.next().toLowerCase();
		while (true) {
			temp = sc.next();
			if(temp.toLowerCase().equals(w))
				counter++;
			if(temp.equals("END_OF_TEXT"))
				break;
		}
		System.out.println(counter);
	}

Compiler output:
Main.java:18: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.io.*;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Integer count = 0;
		Scanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		String word = s.next().toLowerCase();
		while(s.hasNext()){
			String input = s.next().toLowerCase();
			if(input.equals("end_of_text")){
				break;
			}
			if(word.equals(input)){
				count++;
			}
		}
		s.close();
		System.out.println(count);
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
		Scanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		^
  symbol:   class Scanner
  location: class Main
Main.java:11: error: cannot find symbol
		Scanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		                ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

package Vol0;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class FindingWord {

	private static int cnt = 0;
	private static String keyword;
	private static final String EOF = "END_OF_TEXT";
	
	public static void main(String args[]) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		keyword = (" " + br.readLine() + " ").toUpperCase();
		
		String line;
		while (!(line = br.readLine()).equals(EOF)) {
			line = (" " + line + " ").toUpperCase();
			int str = 0;
			while((str = line.indexOf(keyword, str))!=-1){
				cnt++;
				str++;
			}
		}
		System.out.println(cnt);
	}
}

Compiler output:
Main.java:6: error: class FindingWord is public, should be declared in a file named FindingWord.java
public class FindingWord {
       ^
1 error
Language: C

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

int main(void){

   int c,i;

   char T[1000],W[10];

   char E[20] = "end_of_text";
   char en[20] = "END_OF_TEXT"

   c=0;

   scanf("%s",W);
   while(1){

       scanf("%s",T);
       if(strcmp(T,E)==0){

           break;

       }
       for(i=0;i<1001;i++){
       T[i] = tolower(T[i]);
       }
       if(strcmp(T,W)==0){

           c++;

       }
       

   }

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

   return 0;

}


Compiler output:
main.c: In function 'main':
main.c:14:4: error: expected ',' or ';' before 'c'
   14 |    c=0;
      |    ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:8:17: error: 'END_OF_TEXT' undeclared (first use in this function)
    8 |  while(strcmp(W,END_OF_TEXT)!=0){
      |                 ^~~~~~~~~~~
main.c:8:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <iostream>
#include <cstring>
#include <sstream>

using namespace std;
int main(void)
{
	string b,t;
	cin>> b;
	int s=0;

	while (cin>> t){
		for (int i=0;i<t.size();i++){
			if (t[i]<97){
				t[i]=t[i]+32;
			}
		}
		if (t==b){
			s++;
		}
	}
	cout<< s << endl;
}


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

#include<iostream>
#include<string>

using namespace std;
int main(void)
{
  string w;
  string t;
  cin >> w;
  int i;
  for(i=0;i<w.size();i++) {
    if('A'<=w[i]&&w[i]<='Z') w[i]+='a'-'A';
  }

  int o=0;
  cin >> t;
  while(t!="END_OF_TEXT"){
   
    for(i=0;i<t.size();i++) {
      if('A'<=t[i]&&t[i]<='Z') t[i]+='a'-'A';
    }
    if(w==t) o++;
    cin >> t;
  }
  cout << o << endl;
}


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

include<stdio.h>
 
int main(void){
    int i,j;
    char w[20],t[2000];
    char end[20] = "END_OF_TEXT";
 
    scanf("%s",w);
 
    j = 0;
    while(1){
        scanf("%s",t);
        for(i = 0;i < 12;i++)
            if(t[i] != end[i])
                break;
        if(i == 12)
            break;
 
        i = -1;
        while(t[++i] !='\0')
            if(t[i] >= 'A' && t[i] <= 'Z')
                t[i] += 0x20;
 
        i = 0;
        while(1){
            if(t[i] != w[i])
                break;
            if(t[i] == '\0'){j++;break;}
            i++;
        }
    }
    printf("%d\n",j);
    return 0;
}


Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

	for (i = 0;word_length[i] != '\0';i ++) {
		word_lenth[i] ++;
	}



Compiler output:
main.c:1:9: error: expected identifier or '(' before 'for'
    1 |         for (i = 0;word_length[i] != '\0';i ++) {
      |         ^~~
main.c:1:32: error: 'i' undeclared here (not in a function)
    1 |         for (i = 0;word_length[i] != '\0';i ++) {
      |                                ^
main.c:1:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before '!=' token
    1 |         for (i = 0;word_length[i] != '\0';i ++) {
      |                                   ^~
main.c:1:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    1 |         for (i = 0;word_length[i] != '\0';i ++) {
      |                                             ^~
Language: C

#include <stdio.h>

int search (char* word,char* sentence); //関数予告 お楽しみに！

int main () {
	char W[11],T[1001];
	int count;
	//wordは1回読めばいい
	scanf ("%d",&W);
	/*sentenceは単語単位に分けます
	while文をbreak条件まで回す
	scanfは空白も理解*/
	while (1) {
		scanf ("%s",&T); //文字列はs!
		if (strcmp (T,"END_OF_TEXT") == 0) { 
			//strcmp 一致してたら0を返す
			break;
		}
		/*それでは、searchパイセンよろしくお願いしまーす!
		(サマーウォーズ風)*/
		if (search (W,T) == 0) {
			count ++;
			//何単語あるか調べるんだよね
		}
		
	}
	printf ("%d",count);
	
	return 0;
}

int search (char* word,char* sentence) {
//pointerの*です　そんな怖くないよ…ね？
//あ、注意　sentenceだけどsentenceの1単語やからな

	//さてさて、まず長さが等しくないと話にならないっしょ
	int word_length = 0,sent_length = 0;
	int i;
	for (i = 0;word[i] != '\0';i ++) {
		// '\0' はcharによる
		word_lenth[i] ++;
	}
	for (i = 0;sentence[i] != '\0';i ++) {
		sent_lenth[i] ++;
	}
	if (word_length != sent_length) {
		return -1;
	}
	
	/*次、長さ同じなら文字が一つずつ同じか
	ただし、大文字、小文字は区別しない*/
	for (i = 0;word[i] != '\0';i ++) {
		if (word[i] - sentence[i] != 0
		    && word[i] - sentence[i] != 32
		    && word[i] - sentence[i] != -32) {
		    /*ascii code
		    a -> 97   A -> 65*/
		    	return -1;
		    }
	}
	return 0;
	//ほう、よくこれほどの条件をくぐり抜けてきたな
}











	


Compiler output:
main.c: In function 'main':
main.c:15:21: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   15 |                 if (strcmp (T,"END_OF_TEXT") == 0) {
      |                     ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c: In function 'search':
main.c:41:17: error: 'word_lenth' undeclared (first use in this function); did you mean 'word_length'?
   41 |                 word_lenth[i] ++;
      |                 ^~~~~~~~~~
      |                 word_length
main.c:41:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:44:17: error: 'sent_lenth' undeclared (first use in this function); did you mean 'sent_length'?
   44 |                 sent_lenth[i] ++;
      |                 ^~~~~~~~~~
      |                 sent_length
Language: C

#include <stdio.h>
 
int search (char* word,char* sentence); //関数予告 お楽しみに！
 
int main () {
    char W[11],T[1001];
    int count;
    //wordは1回読めばいい
    scanf ("%d",&W);
    /*sentenceは単語単位に分けます
    while文をbreak条件まで回す
    scanfは空白も理解*/
    while (1) {
        scanf ("%s",&T); //文字列はs!
        if (strcmp (T,"END_OF_TEXT") == 0) { 
            //strcmp 一致してたら0を返す
            break;
        }
        /*それでは、searchパイセンよろしくお願いしまーす!
        (サマーウォーズ風)*/
        if (search (W,T) == 0) {
            count ++;
            //何単語あるか調べるんだよね
        }
         
    }
    printf ("%d",count);
     
    return 0;
}
 
int search (char* word,char* sentence) {
//pointerの*です　そんな怖くないよ…ね？
//あ、注意　sentenceだけどsentenceの1単語やからな
 
    //さてさて、まず長さが等しくないと話にならないっしょ
    int word_length = 0,sent_length = 0;
    int i;
    for (i = 0;word[i] != '\0';i ++) {
        // '\0' はcharによる
        word_length[i] ++;
    }
    for (i = 0;sentence[i] != '\0';i ++) {
        sent_lenth[i] ++;
    }
    if (word_length != sent_length) {
        return -1;
    }
     
    /*次、長さ同じなら文字が一つずつ同じか
    ただし、大文字、小文字は区別しない*/
    for (i = 0;word[i] != '\0';i ++) {
        if (word[i] - sentence[i] != 0
            && word[i] - sentence[i] != 32
            && word[i] - sentence[i] != -32) {
            /*ascii code
            a -> 97   A -> 65*/
                return -1;
            }
    }
    return 0;
    //ほう、よくこれほどの条件をくぐり抜けてきたな
}


Compiler output:
main.c: In function 'main':
main.c:15:13: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   15 |         if (strcmp (T,"END_OF_TEXT") == 0) {
      |             ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c: In function 'search':
main.c:41:20: error: subscripted value is neither array nor pointer nor vector
   41 |         word_length[i] ++;
      |                    ^
main.c:44:9: error: 'sent_lenth' undeclared (first use in this function); did you mean 'sent_length'?
   44 |         sent_lenth[i] ++;
      |         ^~~~~~~~~~
      |         sent_length
main.c:44:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include <string.h>
int main(void)
{
	char w[10], t[1000], c = 0, i;
	scanf("%s", w);
	while (scanf("%s", t) && strcmp(t, "END_OF_TEXT") != 0) {
		for (i = 0; i < strlen(t); i++) {
			t[i] = 'A' <= t[i] && 'Z' >= t[i] ? t[i] - 'A' + 'a' : t[i];
			if (strcmp(t, w) == 0) {
				c++;
			}
		}
	}
	printf("%d\n", c);

	return(0);


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

#include<stdio.h>
#include <string.h>
int main(void)
{
	char w[10], t[1000], c = 0, i;
	scanf("%s", w);
	while (scanf("%s", t) && strcmp(t, "END_OF_TEXT") != 0) {
		for (i = 0; i < strlen(t); i++) t[i] = 'A' <= t[i] && 'Z' >= t[i] ? t[i] - 'A' + 'a' : t[i];
		if (strcmp(t, w) == 0) c++;
	}
	printf("%d\n", c);

	return(0);


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

#include<stdio.h>
#include <string.h>
int main(void)
{
	int main() {
		char w[10], t[1000], c = 0, i;
		scanf("%s", w);
		while (scanf("%s", t) && strcmp(t, "END_OF_TEXT") != 0) {
			for (i = 0; i < strlen(t); i++) t[i] = 'A' <= t[i] && 'Z' >= t[i] ? t[i] - 'A' + 'a' : t[i];
			if (strcmp(t, w) == 0) c++;
		}
		printf("%d\n", c);

	return(0);
}


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

#include <iostream>
#include <string>

using namespace std;

int main(void)
{
	string W, T;
	int count, i;
	count = 0;
	getline(cin, W);
	getline(cin, T);
	while (T != "END_OF_TEXT")
	{
		while ((i = T.find(W)) != -1)
		{
			T.erase(i, W.length());
			count++;
		}
		getline(cin, T);
	}
	cout << count << 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>
 
int main(void) {
  char w[11];
  char T[1001];
  int cnt = 0;
  int i;
  scanf("%s", &w);
  for (i = 0; i < strlen(w); i++) {
    w[i] = tolower(w[i]);
  }
  while(1) {
    scanf("%s", &T);
    if (strcmp(T, "END_OF_TEXT") == 0) break;//Tと"END_OF_TEXT"は同じ文字かどうか
    for (i = 0; i < strlen(t); i++) {
      T[i] = tolower(T[i]);//大文字から小文字へ
    }
    if (strcmp(T, w) == 0) cnt++;//T, wは同じ文字かどうか
  }
  printf("%d\n", cnt);
  return 0;
}


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

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

int main(void){
	char w[11]={0};
	char t[1001]={0};
	int i;
	int count=0;
	scanf("%s",w);
	for(i=0;i<11;i++) w[i]= tolower(w[i]);
	while(1){
		scanf(" %s",t);
		if(!strcmp(t,"END_OF_TEXT")){
			break;
		}
		for(i=0;i<1001;i++){
			t[i]= tolower(t[i]);
		}

		if(!strcmp(t,w)){
			count++;
		}
	}
	printf("%d\n",count);
	return0;
}

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

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

int main(){
  int count=0;
  char t,txt[1000]={NULL},word[10]={NULL},end[]={"END_OF_TEXT"};
  char *ret;
  scanf("%s",word);
  scanf("%c",&t);//dummy
  while(scanf("%c",&t)){
    txt[i]=t;
    i++;
    if(strstr(txt,end)!=NULL) break;
  }
  while(1){
    if(strstr(txt,word)!=NULL){
      ret = strstr(txt,word);
      txt[ret-txt]='~';
      count++;
    }else break;
  }
    
  printf("%d\n",count);
  puts(txt);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:21: error: initialization of 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
    6 |   char t,txt[1000]={NULL},word[10]={NULL},end[]={"END_OF_TEXT"};
      |                     ^~~~
main.c:6:21: note: (near initialization for 'txt[0]')
main.c:6:37: error: initialization of 'char' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
    6 |   char t,txt[1000]={NULL},word[10]={NULL},end[]={"END_OF_TEXT"};
      |                                     ^~~~
main.c:6:37: note: (near initialization for 'word[0]')
main.c:11:9: error: 'i' undeclared (first use in this function)
   11 |     txt[i]=t;
      |         ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in