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


import java.io.*;
import java.nio.file.*;
import java.util.*;
import java.util.regex.*;
import java.util.stream.*;



public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String SS=sc.next();

    int count =0;
    
    int K=SS.length();
      for(int i=0;i<K/2;i++){
        if(SS.charAt(i)==SS.charAt(K-1-i)){
        count=count+0;
        }else if(SS.charAt(i)!=SS.charAt(K-1-i)){
          count=count+1;
        }
      }
      System.out.println("count");
    if(K==1){
      System.out.println("0");
      
    }
  }

          
          


Compiler output:
Main.java:30: error: reached end of file while parsing
  }
   ^
1 error
Language: C++

include<bits/stdc++.h> 
using namespace std; 
  
 
   
void change(string s) 
{ 
  
     
    int n = s.length();  
  
    
    int cc = 0; 
  
    for(int i=0;i<n/2;i++) 
    { 
  
       
        if(s[i]== s[n-i-1])  
            continue; 
  
         
        cc+= 1; 
  
          
        if(s[i]<s[n-i-1])  
            s[n-i-1]= s[i] ; 
        else
            s[i]= s[n-i-1] ; 
    } 
    printf("Minimum characters to be replaced = %d\n", (cc)) ; 
    cout<<s<<endl;  
} 

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc:6:6: error: variable or field 'change' declared void
    6 | void change(string s)
      |      ^~~~~~
a.cc:6:13: error: 'string' was not declared in this scope
    6 | void change(string s)
      |             ^~~~~~
Language: C++

#include<cstdio>
#include<cstring>
int main()
{
	char z[200];
	while(gets(z))
	{
		int l=strlen(z);
		int count=0;
		for(int i=0;i<l/2;i++)
		{
			if(z[i]!=z[l-i-1])
			count++;
		}
		printf("%d\n",count);
		memset(z,'\0',sizeof(z));
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |         while(gets(z))
      |               ^~~~
      |               getw
Language: C++

#include<bits/stdc++.h>
int main()
{
	char z[200];
	while(gets(z))
	{
		int l=strlen(z);
		int count=0;
		for(int i=0;i<l/2;i++)
		{
			if(z[i]!=z[l-i-1])
			count++;
		}
		printf("%d\n",count);
		memset(z,'\0',sizeof(z));
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |         while(gets(z))
      |               ^~~~
      |               getw
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    	Scanner s = new Scanner(System.in);
    	String word = s.nextLine();
    	int leng = word.length();
    	String re = word.reverse();
    	int c = 0;
    	for(i=leng-1; i<=0; i--){
          if(word.charAt(i) == re.charAt(i)){
            	continue;
          }else
            c++;
        }
    System.out.println(c/2);
  }
}


Compiler output:
Main.java:7: error: cannot find symbol
    	String re = word.reverse();
    	                ^
  symbol:   method reverse()
  location: variable word of type String
Main.java:9: error: cannot find symbol
    	for(i=leng-1; i<=0; i--){
    	    ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    	for(i=leng-1; i<=0; i--){
    	              ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    	for(i=leng-1; i<=0; i--){
    	                    ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
          if(word.charAt(i) == re.charAt(i)){
                         ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
          if(word.charAt(i) == re.charAt(i)){
                                         ^
  symbol:   variable i
  location: class Main
6 errors
Language: Java

import java.util.Scanner;

public class Main {
 
  public static void main(String[] args) {
  
	String str;
    int num, A1;
    
    Scanner scanner = new Scanner(System.in);
    str = scanner.nextLine();
   	
    for (int i=0; i < str.length() / 2; i++) {
    	if(str.charAt(i) != str.charAt(str.length()-1-i)){
          num++;
        }
    }
  System.out.println(num);
  }
  
}

Compiler output:
Main.java:15: error: variable num might not have been initialized
          num++;
          ^
Main.java:18: error: variable num might not have been initialized
  System.out.println(num);
                     ^
2 errors
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;

int main(){
string s;
int ans=0;
for(i=0;i<s.length();i++){
  if(s[i]!=s[s.length()-1-i]){
    ans++;
  }
}
cout<<ans<<"\n";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'i' was not declared in this scope
    8 | for(i=0;i<s.length();i++){
      |     ^
Language: C

include <stdio.h>

int main(void) {
	char s[100];
	int i,c=0;
	scanf("%s",s);
	for(i=0; s[i]!='\0'; ++i);
	for(int j=0;j<i/2;j++){
		if(s[j]!=s[i-j])c++;
	}
	printf("%d",c);
	// your code goes here
	return 0;
}


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

include <stdio.h>

int main(void) {
	char s[100];
	int i,c=0;
	scanf("%s",s);
	for(i=0; s[i]!='\0'; ++i);
	for(int j=0;j<i/2;j++){
		if(s[j]!=s[i-j])c++;
	}
	printf("%d",c);
	// your code goes here
	return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: Java

public class Main {
  
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String in = scan.next();
    int count = 0;
    char[] input = in.chars();
    ArrayList<char> list = new ArrayList<>();
    for (int i = 0;i < input.length() / 2;i++) {
      if (input.get(i) != input.get(input.length() -1 - i)) {
        count++;
      }
    }
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
                       ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: incompatible types: IntStream cannot be converted to char[]
    char[] input = in.chars();
                           ^
Main.java:8: error: cannot find symbol
    ArrayList<char> list = new ArrayList<>();
    ^
  symbol:   class ArrayList
  location: class Main
Main.java:8: error: unexpected type
    ArrayList<char> list = new ArrayList<>();
              ^
  required: reference
  found:    char
Main.java:8: error: cannot find symbol
    ArrayList<char> list = new ArrayList<>();
                               ^
  symbol:   class ArrayList
  location: class Main
Main.java:9: error: cannot find symbol
    for (int i = 0;i < input.length() / 2;i++) {
                            ^
  symbol:   method length()
  location: variable input of type char[]
Main.java:10: error: cannot find symbol
      if (input.get(i) != input.get(input.length() -1 - i)) {
               ^
  symbol:   method get(int)
  location: variable input of type char[]
Main.java:10: error: cannot find symbol
      if (input.get(i) != input.get(input.length() -1 - i)) {
                                         ^
  symbol:   method length()
  location: variable input of type char[]
9 errors
Language: Java

public class Main {
  
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String in = scan.next();
    int count = 0;
    char[] input = in.chars();
    ArrayList<char> list = new ArrayList<>();
    for (int i = 0;i < input.length() / 2;i++) {
      if (input.get(i) != input.get(input.length() -1 - i) {
        count++;
      }
    }
  }
}

Compiler output:
Main.java:10: error: ')' expected
      if (input.get(i) != input.get(input.length() -1 - i) {
                                                          ^
1 error
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define sz(x) ll(x.size())
using namespace std;

int main(){
  int n,ans=0;
  string s;
  cin >> s;
  n=sz(s)-1;
  while(i>n-i){
  	if(s.at(i)!=s.at(n-i)) ans++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'i' was not declared in this scope
   12 |   while(i>n-i){
      |         ^
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define sz(x) ll(x.size())
using namespace std;

int main(){
  int ans=0;
  string s;
  cin >> s;
  n=sz(s)-1;
  while(i>n-i){
  	if(s.at(i)!=s.at(n-i)) ans++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'n' was not declared in this scope
   11 |   n=sz(s)-1;
      |   ^
a.cc:12:9: error: 'i' was not declared in this scope
   12 |   while(i>n-i){
      |         ^
Language: Java

 public int palindromify(String pal, String read) {
    StringBuilder sb = new StringBuilder(read);
    int insertions = 0;  
    int palIndex = 0;  
    Set<Character> none = new HashSet<>();
    boolean outOfInput = false;
    for (int i = 0;; i++) {
        if (i >= sb.length()) {
            outOfInput = true;  
        }
        if (palIndex >= pal.length()) {
            sb.delete(i, sb.length());  
        }
        char curr = pal.charAt(palIndex++);  
        if (sb.charAt(i) != curr) {
            
            boolean found = false;
            if (!none.contains(curr)) {  
                for (int w = i + 1; w < sb.length(); w++) {
                    if (sb.charAt(w) == curr) {
                        sb.replace(i, w + 1, "" + curr);  
                        found = true;
                        break;
                    }
                }
                if (!found) {
                    none.add(curr);
                }
            }
            if (!found) {
                 
                sb.insert(i, curr);
                insertions++;  
            }
        }
    }
    
    return insertions + (outOfInput ? pal.length() - sb.length() : 0);
}
 

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
 public int palindromify(String pal, String read) {
        ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset

using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
	string S;
	cin >> S;
	string rev(S);
	reverse(rev.begin(), rev.end());
	int end = ceil(S.length() / 2.0);
	int sum = 0;
	rep(i, end) {
		if (S[i] != rev[i]) sum++;
	}
	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:19: error: 'ceil' was not declared in this scope
   26 |         int end = ceil(S.length() / 2.0);
      |                   ^~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      String S = scan.next();
      int hug = 0;
      for(int low;low<=100;low++){
        for(int high;high>=0;high--){
          int mid = (high + low) /2;
          if (low == mid)return;
          if(S.charAt(low) != S.charAt(high))hug++;
        }
      } 
	}
}

Compiler output:
Main.java:7: error: variable low might not have been initialized
      for(int low;low<=100;low++){
                  ^
Main.java:8: error: variable high might not have been initialized
        for(int high;high>=0;high--){
                     ^
2 errors
Language: Java

String s="linkaeiouideknil";
String p="";
String word="linkedin";
char[] wordC = word.toCharArray();
StringBuilder sb = new StringBuilder();
sb.append(word);
String drow = sb.reverse().toString();
sb.reverse();
sb.append(drow);
String pali=sb.toString();
char[] sC = s.toCharArray();
sC=Arrays.copyOf(sC, pali.length());
sb.delete(0, sb.length());
int counter=0;
for (int i = 0; i < sC.length; i++) {
    if(sC[i]!=pali.charAt(i)){
        sC[i]=pali.charAt(i);
        counter++;
    }
    sb.append(sC[i]);
}
System.out.println(counter);    
p=sb.toString();
System.out.println(p);

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
String s="linkaeiouideknil";
^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
sb.append(word);
^
Main.java:8: error: class, interface, enum, or record expected
sb.reverse();
^
Main.java:9: error: class, interface, enum, or record expected
sb.append(drow);
^
Main.java:12: error: class, interface, enum, or record expected
sC=Arrays.copyOf(sC, pali.length());
^
Main.java:13: error: class, interface, enum, or record expected
sb.delete(0, sb.length());
^
Main.java:15: error: class, interface, enum, or record expected
for (int i = 0; i < sC.length; i++) {
^
Main.java:15: error: class, interface, enum, or record expected
for (int i = 0; i < sC.length; i++) {
                ^
Main.java:15: error: class, interface, enum, or record expected
for (int i = 0; i < sC.length; i++) {
                               ^
Main.java:18: error: class, interface, enum, or record expected
        counter++;
        ^
Main.java:19: error: class, interface, enum, or record expected
    }
    ^
Main.java:21: error: class, interface, enum, or record expected
}
^
Main.java:23: error: class, interface, enum, or record expected
p=sb.toString();
^
Main.java:24: error: class, interface, enum, or record expected
System.out.println(p);
^
14 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int ans=0;
  for(int i=1;i<=s.size()/2;i++)
  {
    if(s[i]!=s[s.size()-i+1]ans++;
    }
       cout<<ans;
       return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before 'ans'
   10 |     if(s[i]!=s[s.size()-i+1]ans++;
      |                             ^~~
      |                             ;
a.cc:11:5: error: expected primary-expression before '}' token
   11 |     }
      |     ^
a.cc:10:35: error: expected ')' before '}' token
   10 |     if(s[i]!=s[s.size()-i+1]ans++;
      |       ~                           ^
      |                                   )
   11 |     }
      |     ~                              
a.cc:11:5: error: expected primary-expression before '}' token
   11 |     }
      |     ^
Language: C++

#include<iostream>
#include<string>
//#include<vector>
using namespace std;

int main()
{
	string S, rs;
	int cnt = 0;
	cin >> S;
	rs = S;
	reverse(rs.begin(), rs.end());

	for (int i = 0; i < S.size(); i++)
	{
		if ((S[i] != rs[i]))
		{
			cnt++;
		}
	}
	if (cnt == 0)
	{
		cout << cnt << endl;
	}
	else
	{
		cout << cnt / 2 << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'reverse' was not declared in this scope
   12 |         reverse(rs.begin(), rs.end());
      |         ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str1;
  cin >>str1; 
  int count=0;
  int size
  size=str1.size()
  for (int i = 0; i<size;i++){
    if(str1.at(i)!=str1.at(size-i)){
      str1.at(i) =str1.at(size-i);
    count++;
  }
  }
  cout <<count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected initializer before 'size'
    9 |   size=str1.size()
      |   ^~~~
a.cc:10:19: error: 'i' was not declared in this scope
   10 |   for (int i = 0; i<size;i++){
      |                   ^
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    	Scanner s = new Scanner(System.in);
    	String word = s.nextLine();
    	int leng = word.length();
    	String re = word.reverse();
    	int c = 0;
    	for(i=leng-1; i<=0; i--){
          if(word.charAt(i) == re.charAt(i)){
            	continues;
          }else
            c++;
        }
    System.out.println(c/2);
  }
}

Compiler output:
Main.java:11: error: not a statement
            	continues;
            	^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str1;
  cin >>str1; 
  int count=0;
  size=str1.size()
  for (int i = 0; i<size;i++){
    if(str1.at(i)!=str1.at(size-i)){
      str1.at(i) =str1.at(size-i);
    count++;
  }
  }
  cout <<count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: overloaded function with no contextual type information
    8 |   size=str1.size()
      |                  ^
a.cc:9:19: error: 'i' was not declared in this scope
    9 |   for (int i = 0; i<size;i++){
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define LD long double
#define LL long long int
#define ULL unsigned long long
#define vi vector<int>
#define mod 1000000007

int main(){
	string s;
  	cin>>s;
  	int len = s.length();
  	int i=0; j=len-1;
  	int count = 0;
  	while(i<j){
     	if( s[i] != s[j]){
         count++; 
        }
      i++;
      j--;
    }
  	cout << count<<endl;
  
  
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: 'j' was not declared in this scope
   13 |         int i=0; j=len-1;
      |                  ^
Language: C++


// C program to find minimum number of appends 
// needed to make a string Palindrome 
#include<stdio.h> 
#include<string.h> 
#include<stdbool.h> 
  
// Checking if the string is palindrome or not 
bool isPalindrome(char *str) 
{ 
    int len = strlen(str); 
  
    // single character is always palindrome 
    if (len == 1) 
        return true; 
  
    // pointing to first character 
    char *ptr1 = str; 
  
    // pointing to last character 
    char *ptr2 = str+len-1; 
  
    while (ptr2 > ptr1) 
    { 
        if (*ptr1 != *ptr2) 
            return false; 
        ptr1++; 
        ptr2--; 
    } 
  
    return true; 
} 
  
// Recursive function to count number of appends 
int noOfAppends(char s[]) 
{ 
    if (isPalindrome(s)) 
        return 0; 
  
    // Removing first character of string by 
    // incrementing base address pointer. 
    s++; 
  
    return 1 + noOfAppends(s); 
} 
  
// Driver program to test above functions 
int main() 
{ 
    char s[100];
    scanf("%s",&s)
    printf("%d\n", noOfAppends(s)); 
    return 0; 
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:51:19: error: expected ';' before 'printf'
   51 |     scanf("%s",&s)
      |                   ^
      |                   ;
   52 |     printf("%d\n", noOfAppends(s));
      |     ~~~~~~
Language: C++

#include <stdio.h>

int main(void) {
    int n,i,hug=0;
    char str[100];
    
    scanf("%100s",str);
    
    n=(int)strlen(str);
    
    printf("%d",n);
    
    if (n%2==0) {
        for (i=0;i<=(n/2)+1;i++) {
            if (str[i]!=str[n-1]) {
                hug++;
            }
            n--;
        }
    } else {
        for (i=0;i<=((n-1)/2);i++) {
            if (str[i]!=str[n-1]) {
                hug++;
            }
            n--;
        }
    }
    
    printf("%d\n",hug);
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'strlen' was not declared in this scope
    9 |     n=(int)strlen(str);
      |            ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 |
Language: C

#include <stdio.h>
 
int main()
{
	int i,a;
 
	char *b[a+1];
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);

	for ( i = 0; i < a; i++) {
		if (b[ i] = b[a-i+1]) 
        {
          printf("&d",&i);
    }
		

	
 
}

Compiler output:
main.c: In function 'main':
main.c:10:18: warning: comparison between pointer and zero character constant [-Wpointer-compare]
   10 |     for(i=0; b[a]!='\0'; ++a);
      |                  ^~
main.c:10:14: note: did you mean to dereference the pointer?
   10 |     for(i=0; b[a]!='\0'; ++a);
      |              ^
main.c:21:1: error: expected declaration or statement at end of input
   21 | }
      | ^
Language: C

#include <stdio.h>
 
int main()
{
	int i,a;
 
	char b[a+1];
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);

	for ( i = 0; i < a; i++) {
		if (b[ i] = b[a-i+1]) 
        {
          printf("&d",&i);
    }
		

	
 
}

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

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

int main(){
  string s;
  int cnt=0;
  cin >> s;
  int j=s.size()-1;
  for(int i=0;;i++,i--){
    if(i=>j)break;
    if(s[i]!=s[j])cnt++;
  }
  cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected primary-expression before '>' token
   11 |     if(i=>j)break;
      |          ^
Language: Java

import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String SS=sc.nextLine();
    String[]sr=SS.split("");
    int count =0;
    int K=SS.length;
    if(K!=1){
      for(int i=0;i<K/2;i++){
        if(sr[i]==sr[K-i]){
          count+=0;
        }else if(sr[i]!=sr[K-i]){
          count+=1;
          sr[i]=sr[K-i];
        }
      }
    }
          if(K==1){
      System.out.println("0");
    }
    if(count!=0){
      System.out.println("count");
    }

    }
  }

          
          


Compiler output:
Main.java:9: error: cannot find symbol
    int K=SS.length;
            ^
  symbol:   variable length
  location: variable SS of type String
1 error
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        Char[] chars = str.toCharArray();
        int cnt = 0;
        if(chars.length % 2 == 0 ){ //偶数文字列
            for(int i = 0; i < chars.length/2; i++){
                if( chars[i] == chars[chars.length-1-i] ){
                    continue;
                } else {
                    cnt++;
                }
            }
        }
    }
}


Compiler output:
Main.java:6: error: cannot find symbol
        Char[] chars = str.toCharArray();
        ^
  symbol:   class Char
  location: class Main
1 error
Language: C++

#include<string>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int cnt=0;
  string a,b;
  cin>>a;
  b=a;
  reverse(b.begin(),b.end());
  for(int i=0;i<a.size()/2;i++){
    if(a[i]!=b[i])cnt++;
  }
  printf("%d\n",cnt);

Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: expected '}' at end of input
   15 |   printf("%d\n",cnt);
      |                      ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C

#include<stdio.h>
#define N 100
 
int main(){
 
	int m;
	int Ans=0;
 
	char S[N];
	scanf("%s",S);
	for(m=0; S[m]!='\0'; ++m);
 
 int i = 0;
  while(i =< m-1-i){
  	if(S[i] != S[m - 1 - i]){
		S[m - i] = S[i];
		Ans++;
  	}	
 	i++;
 }
  	printf("%d",Ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:12: error: expected expression before '<' token
   14 |   while(i =< m-1-i){
      |            ^
Language: C++

#include<stdio.h>

int main(void){
    int n,i,hug=0;
    char str[100];
    
    scanf("%100s",str);
    
    n=(int)strlen(str);
    
    printf("%d",n);
    
    if (n%2==0) {
        for (i=0;i<=(n/2)+1;i++) {
            if (str[i]!=str[n-1]) {
                hug++;
            }
            n--;
        }
    } else {
        for (i=0;i<=((n-1)/2);i++) {
            if (str[i]!=str[n-1]) {
                hug++;
            }
            n--;
        }
    }
    
    printf("%d\n",hug);
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'strlen' was not declared in this scope
    9 |     n=(int)strlen(str);
      |            ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 |
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        Char[] chars = str.toCharArray();
        int cnt = 0;
        if(chars.length % 2 == 0 ){
            for(int i = 0; i < chars.length/2 i++){
                if( chars[i] == chars[chars.length-1-i] ){
                    continue;
                } else {
                    cnt++;
                }
            }
        }
    }
}


Compiler output:
Main.java:9: error: ';' expected
            for(int i = 0; i < chars.length/2 i++){
                                             ^
1 error
Language: C++

#include <iostream>
#include <vector>
#include <string>
using namespace std; 
string str; 
int ans; 

int main()
{
	cin >> str; 
	for (int i = 0; i < str.length() / 2; ++i)
	{
		if (str[i] != str[str.size() - i - 1])
			++ans; 
			//cout << str[i] << " " << str[str.size() - i] << endl; 
	}
	cout << ans; 
  return 0； 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: unable to find numeric literal operator 'operator""\U0000ff1b'
   18 |   return 0；
      |          ^~~
a.cc:18:13: error: expected ';' before '}' token
   18 |   return 0；
      |             ^
      |             ;
   19 | }
      | ~
Language: C++

#include <iostream>
using namespace std;
 
int main()
{
  string s;
  int w=0;
  getline(cin,s);
  string::iterator it;
  int l=s.length();
  string::iterator it1;
  it=s.begin();
  it11=s.end();
  while(it!=it1)
  {
    if(*it!=*it1)
    {
      w++;
    }
    it++;
    It1--;
  }
  cout<<w;
}
    
#include <iostream>
using namespace std;

int main()
{
  string s;
  int w=0;
  getline(cin,s);
  string::iterator it;
  int l=s.length();
  string::iterator it1;
  it=s.begin();
  it1=s.end();
  while(it1-it!=1)
  {
    if(*it!=*it1)
    {
      w++;
    }
    it++;
    It1--;
  }
  cout<<w;
}
    
Submission Info

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'it11' was not declared in this scope; did you mean 'it1'?
   13 |   it11=s.end();
      |   ^~~~
      |   it1
a.cc:21:5: error: 'It1' was not declared in this scope; did you mean 'it1'?
   21 |     It1--;
      |     ^~~
      |     it1
a.cc: At global scope:
a.cc:29:5: error: redefinition of 'int main()'
   29 | int main()
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:46:5: error: 'It1' was not declared in this scope; did you mean 'it1'?
   46 |     It1--;
      |     ^~~
      |     it1
a.cc: At global scope:
a.cc:51:1: error: 'Submission' does not name a type
   51 | Submission Info
      | ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;

char ch[1000];
int memo[1000][1000];
int re(char a[]) {
	int len = strlen(a);
	int j = len - 1;
	for (int i = 0; i < len; i++) {
		ch[i] = a[j];
		for (int i = 0; i < len; i++) {
			for (int j = 0; j < len; j++) {
				if (a[i] == ch[j]) {
					memo[i + 1][j + 1] = memo[i][j] + 1;
				}
				else {
					memo[i + 1][j + 1] = max(memo[i][j + 1], memo[i + 1][j]);
				}
			}
		}
		j--;
	}
	return len - memo[len][len];
}
int main() {
	char a[1000];
	cin >> a;
	cout << re(a);
}

Compiler output:
a.cc: In function 'int re(char*)':
a.cc:8:19: error: 'strlen' was not declared in this scope
    8 |         int len = strlen(a);
      |                   ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: Java

import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String S=sc.next();
    String[]sr=S.split("");
    int count =0;
    int K=S.length;
    if(K!=1){
      for(int i=0;i<K/2;i++){
        if(sr[i]==sr[K-i]){
          count+=0;
        }else if(sr[i]!=sr[K-i]){
          count+=1;
          sr[i]=sr[K-i];
        }
      }
    }
          if(K=1){
      System.out.println("0");
    }
    if(count!=0){
      System.out.println("count");
    }

    }
  }

          
          


Compiler output:
Main.java:9: error: cannot find symbol
    int K=S.length;
           ^
  symbol:   variable length
  location: variable S of type String
Main.java:20: error: incompatible types: int cannot be converted to boolean
          if(K=1){
              ^
2 errors
Language: C++

#include <stdio.h>

int main(void){
    int n,i,hug=0;
    char str[100];
    
    scanf("%100s",str);
    
    n=(int)strlen(str);
    
    printf("%d",n);
    
    if (n%2==0) {
        for (i=0;i<=(n/2)+1;i++) {
            if (str[i]!=str[n-1]) {
                hug++;
            }
            n--;
        }
    } else {
        for (i=0;i<=((n-1)/2);i++) {
            if (str[i]!=str[n-1]) {
                hug++;
            }
            n--;
        }
    }
    
    printf("%d\n",hug);
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'strlen' was not declared in this scope
    9 |     n=(int)strlen(str);
      |            ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 |
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;

char ch[1010];
int memo[1010][1010];
int re(char a[]) {
	int len = strlen(a);
	int j = len - 1;
	for (int i = 0; i < len; i++) {
		ch[i] = a[j];
		for (int i = 0; i < len; i++) {
			for (int j = 0; j < len; j++) {
				if (a[i] == ch[j]) {
					memo[i + 1][j + 1] = memo[i][j] + 1;
				}
				else {
					memo[i + 1][j + 1] = max(memo[i][j + 1], memo[i + 1][j]);
				}
			}
		}
		j--;
	}
	return len - memo[len][len];
}
int main() {
	char a[1000];
	cin >> a;
	cout << re(a);
}

Compiler output:
a.cc: In function 'int re(char*)':
a.cc:8:19: error: 'strlen' was not declared in this scope
    8 |         int len = strlen(a);
      |                   ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include <stdio.h>

int main(void){
    int n,i,hug=0;
    char str[100];
    
    scanf("%100s",str);
    
    n=strlen(str);
    
    printf("%d",n);
    
    if (n%2==0) {
        for (i=0;i<=(n/2)+1;i++) {
            if (str[i]!=str[n-1]) {
                hug++;
            }
            n--;
        }
    } else {
        for (i=0;i<=((n-1)/2);i++) {
            if (str[i]!=str[n-1]) {
                hug++;
            }
            n--;
        }
    }
    
    printf("%d\n",hug);
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'strlen' was not declared in this scope
    9 |     n=strlen(str);
      |       ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 |
Language: Java

import java.util.*;
public class Main {
		static int Count(char str[], int n){
          int dp[][] = new int[n][n];
          
          boolean p[][] = new boolean[n][n];
          for(int i = 0 ; i<n; i++){
            p[]i[i] = true;
          }
          for(int i =0 ; i<n ;i++){
            if(str[i] == str[i+1]){
             p[i][i+1] = true;
             dp[i][i+1] = 1; 
            }
          }
          for (int gap = 2 ; gap<n ; i++){
            for(int i = 0 ; i<n-gap ; i++){
              int j = gap + i;
              if(str[i] == str[j] && P[i+1][j-1])
                p[i][j] = true;
              if (P[i][j] == true) 
                    dp[i][j] = dp[i][j-1] + dp[i+1][j] + 1 - dp[i+1][j-1]; 
                else
                    dp[i][j] = dp[i][j-1] + dp[i+1][j] - dp[i+1][j-1];
            }  
          }  
          return dp[0][n-1];
        }
  public static void main(String[] args) 
    { 
        Scanner sc = new (System.in);
        String str = sc.next(); 
        System.out.println(Count(str.toCharArray(), str.length())); 
    } 
  
}

Compiler output:
Main.java:8: error: ']' expected
            p[]i[i] = true;
                 ^
Main.java:8: error: ';' expected
            p[]i[i] = true;
                  ^
Main.java:31: error: <identifier> expected
        Scanner sc = new (System.in);
                        ^
3 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str1;
  cin >>str1; 
  int count=0;
  for (i = 0; i<str1.size();i++){
    if(str1.at(i)!=str1.at(str1.size()-i)){
      str1.at(i) =str1.at(str1.size()-i);
    count++;
  }
  }
  cout <<count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |   for (i = 0; i<str1.size();i++){
      |        ^
Language: C

#include<stdio.h>
#define N 100
 
int main(){
 
	int m;
	int Ans=0;
 
	char S[N];
	scanf("%s",S);
	for(m=0; S[m]!='\0'; ++m);
 
 int i = 0;
  while(S[i] < S[m - 1 - i]){
  	if(S[i] != S[m - 1 - i]){
		S[m - i] = S[i];
		Ans++;
  	}	
 	i++
 }
  	printf("%d",Ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:12: error: expected ';' before '}' token
   19 |         i++
      |            ^
      |            ;
   20 |  }
      |  ~
Language: C

#include <stdio.h>
 
int main()
{
	int i,a;
 
	char b;
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);

	for ( i = 0; i < a; i++) {
		if (b[ i] = b[a-i+1]) 
        {
          printf("&d",&i);
    }
		

	
 
}

Compiler output:
main.c: In function 'main':
main.c:10:15: error: subscripted value is neither array nor pointer nor vector
   10 |     for(i=0; b[a]!='\0'; ++a);
      |               ^
main.c:13:22: error: subscripted value is neither array nor pointer nor vector
   13 |                 if (b[ i] = b[a-i+1])
      |                      ^
main.c:13:30: error: subscripted value is neither array nor pointer nor vector
   13 |                 if (b[ i] = b[a-i+1])
      |                              ^
main.c:21:1: error: expected declaration or statement at end of input
   21 | }
      | ^
Language: C++

#include<bits/stdc++.h> 
using namespace std;  
int findMinInsertions(char str[], int l, int h) 
{ 
	if (l > h) return INT_MAX; 
	if (l == h) return 0; 
	if (l == h - 1) return (str[l] == str[h])? 0 : 1; 
	return (str[l] == str[h])? 
					findMinInsertions(str, l + 1, h - 1): 
					(min(findMinInsertions(str, l, h - 1), 
					findMinInsertions(str, l + 1, h)) + 1); 
} 
 
int main() 
{ 
	char str[100];
	gets(str);
	cout << findMinInsertions(str, 0, strlen(str) - 1); 
	return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   17 |         gets(str);
      |         ^~~~
      |         getw
Language: Java

import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String S=sc.next();
    
    String[]sr=S.split("");
    
    int count =0;
    
    if(S.length!=1){
      for(int i=0;i<5/2;i++){
        if(sr[i]==sr[5-i]){
          count+=0;
        }else if(sr[i]!=sr[5-i]){
          count+=1;
          sr[i]=sr[5-i];
        }
      }
    }
          if(S.length=1){
      System.out.println("0");
    }
    if(count!=0){
      System.out.println("count");
    }

    }
  }

          
          


Compiler output:
Main.java:12: error: cannot find symbol
    if(S.length!=1){
        ^
  symbol:   variable length
  location: variable S of type String
Main.java:22: error: cannot find symbol
          if(S.length=1){
              ^
  symbol:   variable length
  location: variable S of type String
2 errors
Language: C++

#include <iostream>
using namespace std;

int main()
{
  string s;
  int w=0;
  getline(cin,s);
  string::iterator it;
  int l=s.length();
  string::iterator it1;
  it=s.begin();
  it11=s.end();
  while(it!=it1)
  {
    if(*it!=*it1)
    {
      w++;
    }
    it++;
    It1--;
  }
  cout<<w;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'it11' was not declared in this scope; did you mean 'it1'?
   13 |   it11=s.end();
      |   ^~~~
      |   it1
a.cc:21:5: error: 'It1' was not declared in this scope; did you mean 'it1'?
   21 |     It1--;
      |     ^~~
      |     it1
Language: Java

import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String S=sc.next();
    
    String[]sr=S.split("");
    
    int count =0;
    
    if(S.length!=1){
      for(int i=0;i<S.length/2;i++){
        if(sr[i]==sr[S.length-i]){
          count+=0;
        }else if(sr[i]!=sr[S.length-i]){
          count+=1;
          sr[i]=sr[S.length-i];
        }
      }
    }
          if(S.length=1){
      System.out.println("0");
    }
    if(count!=0){
      System.out.println("count");
    }

    }
  }

          
          


Compiler output:
Main.java:12: error: cannot find symbol
    if(S.length!=1){
        ^
  symbol:   variable length
  location: variable S of type String
Main.java:13: error: cannot find symbol
      for(int i=0;i<S.length/2;i++){
                     ^
  symbol:   variable length
  location: variable S of type String
Main.java:14: error: cannot find symbol
        if(sr[i]==sr[S.length-i]){
                      ^
  symbol:   variable length
  location: variable S of type String
Main.java:16: error: cannot find symbol
        }else if(sr[i]!=sr[S.length-i]){
                            ^
  symbol:   variable length
  location: variable S of type String
Main.java:18: error: cannot find symbol
          sr[i]=sr[S.length-i];
                    ^
  symbol:   variable length
  location: variable S of type String
Main.java:22: error: cannot find symbol
          if(S.length=1){
              ^
  symbol:   variable length
  location: variable S of type String
6 errors
Language: C

#include<stdio.h>
#define N 100
 
int main(){
 
	int m;
	int Ans=0;
 
	char S[N];
	scanf("%s",S);
	for(m=0; S[m]!='\0'; ++m);
 
 int i = 0
  while(S[i] < S[m - 1 - i]){
  	if(S[i] != S[m - 1 - i]){
		S[m - i] = S[i];
		Ans++;
  	}	
 	i++
 }
  	printf("%d",Ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:3: error: expected ',' or ';' before 'while'
   14 |   while(S[i] < S[m - 1 - i]){
      |   ^~~~~
Language: Java

import java.util.*;
public class Main {
		static int Count(char str[], int n){
          int dp[][] = new int[n][n];
          
          boolean p[][] = new boolean[n][n];
          for(int i = 0 ; i<n; i++){
            p[]i[i] = true;
          }
          for(int i =0 ; i<n ;i++){
            if(str[i] == str[i+1]){
             p[i][i+1] = true;
             dp[i][i+1] = 1; 
            }
          }
          for (int gap = 2 ; gap<n ; i++){
            for(int i = 0 ; i<n-gap ; i++){
              int j = gap + i;
              if(str[i] == str[j] && P[i+1][j-1])
                p[i][j] = true;
              if (P[i][j] == true) 
                    dp[i][j] = dp[i][j-1] + dp[i+1][j] + 1 - dp[i+1][j-1]; 
                else
                    dp[i][j] = dp[i][j-1] + dp[i+1][j] - dp[i+1][j-1];
            }  
          }  
          return dp[0][n-1];
        }
  public static void main(String[] args) 
    { 
        Scanner sc = new (System.in);
        String str = sc.next(); 
        System.out.println(CountPS(str.toCharArray(), str.length())); 
    } 
  
}

Compiler output:
Main.java:8: error: ']' expected
            p[]i[i] = true;
                 ^
Main.java:8: error: ';' expected
            p[]i[i] = true;
                  ^
Main.java:31: error: <identifier> expected
        Scanner sc = new (System.in);
                        ^
3 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str1;
  cin >>str1; 
  int count=0;
  for (i = 0; i<str1.size();i++){
    if(str1.at(i)!=str1.at(str1.size()-i))
      str1.at(i) =str1.at(str1.size()-i);
    count++;
  }
  cout <<count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |   for (i = 0; i<str1.size();i++){
      |        ^
Language: C

#include <stdio.h>
#include <string.h>
 
int Check(char *s,int len){
  int t;
  for(i=0; i<(len/2); i++){
    if(s[i] != s[len-i])
      t++;
  }
  return t;
}
 
int main(void){
  char *S;
  int a,len;
  scanf("%s", S);
  len = strlen(S);
  a = Check(S,len);
  printf("%d" ,a);
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str1;
  cin >>str1; 
  int count=0;
  for (i = 0; i<str1.size();i++){
    if(str1.at(i)!=str1.at(str1.size()-i))
      str1.at(i) ='str1.at(str1.size()-i)';
    count++;
  }
  cout <<count << endl;
}


Compiler output:
a.cc:10:19: warning: multi-character literal with 22 characters exceeds 'int' size of 4 bytes
   10 |       str1.at(i) ='str1.at(str1.size()-i)';
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |   for (i = 0; i<str1.size();i++){
      |        ^
Language: C

#include <stdio.h>
#include <string.h>
 
int Check(char *s,len){
  int t;
  for(i=0; i<(len/2); i++){
    if(s[i] != s[len-i])
      t++;
  }
  return t;
}
 
int main(void){
  char *S;
  int a,len;
  scanf("%s", S);
  len = strlen(S);
  a = Check(S,len);
  printf("%d" ,a);
  return 0;
}

Compiler output:
main.c:4:19: error: unknown type name 'len'
    4 | int Check(char *s,len){
      |                   ^~~
main.c: In function 'main':
main.c:18:7: error: implicit declaration of function 'Check' [-Wimplicit-function-declaration]
   18 |   a = Check(S,len);
      |       ^~~~~
Language: C++

#include <iostream>
#include <string>

typedef namespace std;

int main(int argc, char* argv[]) {
  string str;
  cin >> str;
  auto len = str.size();
  auto center = (len / 2) - (len%2);
  auto count = 0;
  for(auto i = 0; i < center; ++i) {
    if(str[i] != str[len-i-1]) {
      ++count;
    }
  }
  cout << count << endl;
  return 0;
}

Compiler output:
a.cc:4:9: error: expected unqualified-id before 'namespace'
    4 | typedef namespace std;
      |         ^~~~~~~~~
a.cc: In function 'int main(int, char**)':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string str;
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> str;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:10: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   cin >> str;
      |          ^~~
      |          std
a.cc:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout << count << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   cout << count << endl;
      |                    ^~~~
      |                    std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include <stdio.h>
 
int main()
{
	int i,a;
 
	char b;
	scanf("%s", &b);
  
    for(i=0; b[a]!='\0'; ++a);

	for ( i = 0; i < a; i++) {
		if (b[ i] = b[a-i+1]) 
        {
          printf("&d",&i);
    }
		

	return 0;
 
}

Compiler output:
main.c: In function 'main':
main.c:10:15: error: subscripted value is neither array nor pointer nor vector
   10 |     for(i=0; b[a]!='\0'; ++a);
      |               ^
main.c:13:22: error: subscripted value is neither array nor pointer nor vector
   13 |                 if (b[ i] = b[a-i+1])
      |                      ^
main.c:13:30: error: subscripted value is neither array nor pointer nor vector
   13 |                 if (b[ i] = b[a-i+1])
      |                              ^
main.c:21:1: error: expected declaration or statement at end of input
   21 | }
      | ^
Language: C

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

int Check(char *s,len){
  int t;
  for(i=0; i<(len/2); i++){
    if(s[i] != s[len-i])
      t++;
  }
  return t;
}

int main(void){
  char *S;
  int a;
  scanf("%s", S);
  len = strlen(S);
  a = Check(S,len);
  printf("%d" ,a);
  return 0;
}
  

Compiler output:
main.c:4:19: error: unknown type name 'len'
    4 | int Check(char *s,len){
      |                   ^~~
main.c: In function 'main':
main.c:17:3: error: 'len' undeclared (first use in this function)
   17 |   len = strlen(S);
      |   ^~~
main.c:17:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:7: error: implicit declaration of function 'Check' [-Wimplicit-function-declaration]
   18 |   a = Check(S,len);
      |       ^~~~~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
    String S=sc.nextLine();
    
    String[]sr=S.split("");
    
    int count =0;
    
    if(S.length!=1){
      for(int i=0;i<S.length/2;i++){
        if(sr[i]==sr[S.length-i]){
          count+=0;
        }else if(sr[i]!=sr[S.length-i]){
          count+=1;
          sr[i]=sr[S.length-i];
        }
      }
    }
          if(S.length=1){
      System.out.println("0");
    }
    if(count!=0){
      System.out.println("count");
    }

    }
  }

          
          


Compiler output:
Main.java:12: error: cannot find symbol
    if(S.length!=1){
        ^
  symbol:   variable length
  location: variable S of type String
Main.java:13: error: cannot find symbol
      for(int i=0;i<S.length/2;i++){
                     ^
  symbol:   variable length
  location: variable S of type String
Main.java:14: error: cannot find symbol
        if(sr[i]==sr[S.length-i]){
                      ^
  symbol:   variable length
  location: variable S of type String
Main.java:16: error: cannot find symbol
        }else if(sr[i]!=sr[S.length-i]){
                            ^
  symbol:   variable length
  location: variable S of type String
Main.java:18: error: cannot find symbol
          sr[i]=sr[S.length-i];
                    ^
  symbol:   variable length
  location: variable S of type String
Main.java:22: error: cannot find symbol
          if(S.length=1){
              ^
  symbol:   variable length
  location: variable S of type String
6 errors