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

#include<stdio.h>
 
using namespace std;
 
int main()
{
  char s[1000000],t[1000000];
  scanf("%s%s",s,t);
  
  char *ptrs,*ptrt;
  ptrs = s;
  ptrt = t;
  
  int cnt = 0;
  while(*ptrs != '\0')
  {
    if(*ptrs!=*ptrt)
    {
      cnt++;
    }
    ptrs++;
    ptrt++;
  }
  printf("%d\n",cnt);
  return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'using'
    3 | using namespace std;
      | ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    3 | using namespace std;
      |                 ^~~
Language: C

#include<stdio.h>

using namespace std;
 
int main()
{
  char s[1000000],t[1000000]
  scanf("%s%s",s,t);
  
  char *ptrs,*ptrt;
  ptrs = s;
  ptrt = t;
  
  int cnt = 0;
  while(*ptrs != '\0')
  {
    if(*ptrs!=*ptrt)
    {
      cnt++;
    }
    ptrs++;
    ptrt++;
  }
  printf("%d\n",cnt);
  return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'using'
    3 | using namespace std;
      | ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    3 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:8:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    8 |   scanf("%s%s",s,t);
      |   ^~~~~
main.c:12:10: error: 't' undeclared (first use in this function)
   12 |   ptrt = t;
      |          ^
main.c:12:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;

int main()
{
  char* ps,pt;
  scanf("%s",&ps);
  scanf("%s",&pt);
  
  char* ptrs,ptrt;
  ptrs = ps;
  ptrt = pt;
  
  int cnt = 0;
  while(ptrs != '\0')
  {
    if(ptrs!=ptrt)
    {
      cnt++;
    }
    ptrs++;
    ptrt++;
  }
  return 0;
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   while(ptrs != '\0')
      |         ~~~~~^~~~~~~
a.cc:17:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     if(ptrs!=ptrt)
      |        ~~~~^~~~~~
Language: C

ELF

Compiler output:
main.c:1:1: error: stray '\177' in program
    1 | <U+007F>ELF<U+0002><U+0001><U+0001>
      | ^~~~~~~~
main.c:1:5: error: stray '\2' in program
    1 | <U+007F>ELF<U+0002><U+0001><U+0001>
      |            ^~~~~~~~
main.c:1:6: error: stray '\1' in program
    1 | <U+007F>ELF<U+0002><U+0001><U+0001>
      |                    ^~~~~~~~
main.c:1:7: error: stray '\1' in program
    1 | <U+007F>ELF<U+0002><U+0001><U+0001>
      |                            ^~~~~~~~
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
    1 | ELF
      | ^
Language: Java

import java.util.Scanner;
public class Main
{
	public static void main(String[] args)
    {
      Scanner sc = new Scanner(System.in);
      String s  = sc.nextLine();
      String t = sc.nextLine();
      int cnt = 0;
      for( int  i =0 ; i < s.length()  ; i++)
      
        if( s[i] != t[i] )
          cnt++;
      System.out.println(cnt);
    }
      
}    


Compiler output:
Main.java:12: error: array required, but String found
        if( s[i] != t[i] )
             ^
Main.java:12: error: array required, but String found
        if( s[i] != t[i] )
                     ^
2 errors
Language: Java

import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String a = scan.next();
		String b = scan.next();
		int count = 0;
		for(int i=0; i<a.length(); i++){
			if(!a.charAt(i).equals(b.charAt(i))){
				count++;
			}
		}
		System.out.println(count);
	}
}


Compiler output:
Main.java:10: error: char cannot be dereferenced
			if(!a.charAt(i).equals(b.charAt(i))){
			               ^
1 error
Language: Java

import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String a = scan,next();
		String b = scan.next();
		int count = 0;
		for(int i=0; i<a.length(); i++){
			if(!a.charAt(i).equals(b.charAt(i))){
				count++;
			}
		}
		System.out.println(count);
	}
}


Compiler output:
Main.java:6: error: ';' expected
		String a = scan,next();
		                    ^
1 error
Language: C++

#inslude<iostream>
using namespace std;
int main(){
  string s,t;
  cin >> s >> t;
  int i;
  for(i=0;i<s,size();i++){
    if(s[i]){
      ans++;
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inslude; did you mean #include?
    1 | #inslude<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s,t;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #inslude<iostream>
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> s >> t;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inslude<iostream>
a.cc:5:10: error: 's' was not declared in this scope
    5 |   cin >> s >> t;
      |          ^
a.cc:5:15: error: 't' was not declared in this scope
    5 |   cin >> s >> t;
      |               ^
a.cc:7:15: error: 'size' was not declared in this scope
    7 |   for(i=0;i<s,size();i++){
      |               ^~~~
a.cc:9:7: error: 'ans' was not declared in this scope
    9 |       ans++;
      |       ^~~
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout<<ans<<endl;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:9: error: 'ans' was not declared in this scope
   12 |   cout<<ans<<endl;
      |         ^~~
a.cc:12:14: error: 'endl' was not declared in this scope
   12 |   cout<<ans<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inslude<iostream>
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner ss = new Scanner(System.in);
		Scanner st = new Scanner(System.in);
		
		String s = sS.nextLine();
		String t = sT.nextLine();
		
		int count=0;
		
		char[] sstri= s.toCharArray();
		char[] tstri= t.toCharArray();
		
		for(int i=0;i<=sstri.length;i++){
			if(i==sstri.length){
				System.out.print(count);
			}
			else if(sstri[i] != tstri[i]){
				sstri[i] = tstri[i];
				count++;
			}
		}
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		String s = sS.nextLine();
		           ^
  symbol:   variable sS
  location: class Main
Main.java:8: error: cannot find symbol
		String t = sT.nextLine();
		           ^
  symbol:   variable sT
  location: class Main
2 errors
Language: Java


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

		String T = sc.nextLine();
		String S = sc.nextLine();

		StringBuilder t = new StringBuilder();
		StringBuilder s = new StringBuilder();

		t.append(T);
		s.append(S);

		int count = 0;

		for(int i=0;i<t.length();i++) {
			if(t.substring(i,i).equals(s.substring(i, i))) {

			}else {
				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: C++

#include<bits/stdc++.h>

int main()
{
  string s, t;
  cin>>s>>t;
  int ans = 0;
  int n=s.length();
  for(int i=0;i<n;i++)
    if(s[i]!=t[i])
      ans++;
  cout<<ans<<endl;
  return ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s, t;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>s>>t;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s>>t;
      |        ^
a.cc:6:11: error: 't' was not declared in this scope; did you mean 'tm'?
    6 |   cin>>s>>t;
      |           ^
      |           tm
a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   cout<<ans<<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:12:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |   cout<<ans<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>

int main()
{
  string s, t;
  cin>>s>>t;
  int ans = 0;
  for(int i=0;i<(int)s.length();i++)
    if(s[i]!=t[i])
      ans++;
  cout<<ans<<endl;
  return ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s, t;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>s>>t;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s>>t;
      |        ^
a.cc:6:11: error: 't' was not declared in this scope; did you mean 'tm'?
    6 |   cin>>s>>t;
      |           ^
      |           tm
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout<<ans<<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:11:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout<<ans<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>

int main()
{
  string s, t;
  cin>>s>>t;
  int ans = 0;
  for(int i=0;i<s.length();i++)
    if(s[i]!=t[i])
      ans++;
  cout<<ans<<endl;
  return ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s, t;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>s>>t;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s>>t;
      |        ^
a.cc:6:11: error: 't' was not declared in this scope; did you mean 'tm'?
    6 |   cin>>s>>t;
      |           ^
      |           tm
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout<<ans<<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:11:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout<<ans<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int s[200005],t[200005],a;
int main() 
{
	for(int q=0;a<s.size();a++)
		cin>>s[q];
	for(int q=0;a<t.size();a++)
		cin>>t[q];
	for(int q=0;a<t.size();a++)
		if(s[q]!=t[q]) a++;
		cout<<a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: request for member 'size' in 's', which is of non-class type 'int [200005]'
    6 |         for(int q=0;a<s.size();a++)
      |                         ^~~~
a.cc:8:25: error: request for member 'size' in 't', which is of non-class type 'int [200005]'
    8 |         for(int q=0;a<t.size();a++)
      |                         ^~~~
a.cc:10:25: error: request for member 'size' in 't', which is of non-class type 'int [200005]'
   10 |         for(int q=0;a<t.size();a++)
      |                         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int s[200005],t[200005],a;
int main() 
{
	for(int q=0;a<s.size;a++)
		cin>>s[q];
	for(int q=0;a<t.size;a++)
		cin>>t[q];
	for(int q=0;a<t.size;a++)
		if(s[q]!=t[q]) a++;
		cout<<a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: request for member 'size' in 's', which is of non-class type 'int [200005]'
    6 |         for(int q=0;a<s.size;a++)
      |                         ^~~~
a.cc:8:25: error: request for member 'size' in 't', which is of non-class type 'int [200005]'
    8 |         for(int q=0;a<t.size;a++)
      |                         ^~~~
a.cc:10:25: error: request for member 'size' in 't', which is of non-class type 'int [200005]'
   10 |         for(int q=0;a<t.size;a++)
      |                         ^~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: 'j' was not declared in this scope
   10 |         if(s[i] != s[j]) cnt++;
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s,t;
  cin >> s >> t;
  int size,ans=0;
  size=s.size;
  for(int i=0;i<size;i++){
    if(s.at(i)!=t.at(i)){
      ans++;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
    7 |   size=s.size;
      |          ^~~~
Language: C++

#include <iostream>
 
using namespace std;
 
int main()
{
    string S("");
    string T("");
    cin >> S;
    cin >> T;
    int out=0;
    for(int i=0;i<S.length();++i){
      if S[i]!=T[i]{
         out++ ;
      }
    }
     cout << out  << endl;
      
     return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: expected '(' before 'S'
   13 |       if S[i]!=T[i]{
      |          ^
      |          (
Language: C++

#include <iostream>
 
using namespace std;
 
int main()
{
    string S("");
    string T("");
    cin >> S;
    cin >> T;
    int out=0;
    for(int i=0;i<S.length();i++){
      if S[i]!=T[i]{
         out++ ;
      }
    }
     cout << out  << endl;
      
     return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: expected '(' before 'S'
   13 |       if S[i]!=T[i]{
      |          ^
      |          (
Language: C++

#include <iostream>

using namespace std;

int main()
{
    String S;
    String T;
    cin >> S;
    cin >> T;
    int out=0;
    for(int i=0;i<S.length();i++){
      if S[i]!=T[i]{
         out++ ;
      }
    }
     cout << out  <<end1; 
      
     return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'String' was not declared in this scope
    7 |     String S;
      |     ^~~~~~
a.cc:8:11: error: expected ';' before 'T'
    8 |     String T;
      |           ^~
      |           ;
a.cc:9:12: error: 'S' was not declared in this scope
    9 |     cin >> S;
      |            ^
a.cc:10:12: error: 'T' was not declared in this scope
   10 |     cin >> T;
      |            ^
a.cc:13:10: error: expected '(' before 'S'
   13 |       if S[i]!=T[i]{
      |          ^
      |          (
a.cc:17:21: error: 'end1' was not declared in this scope
   17 |      cout << out  <<end1;
      |                     ^~~~
Language: C++

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

#define ll long long

string s, t;
int ans=0;

void solve() {
    cin >> s >> t;
    for(int i=0; i<s.length; ++i) {
        if(s[i]!=t[i])
            ans++;
    }
    cout << ans << "\n";
}

int main() {
    ios::sync_with_stdio(0);
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:11:22: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   11 |     for(int i=0; i<s.length; ++i) {
      |                    ~~^~~~~~
      |                            ()
Language: C++

#include<iostream>
using namespace std;
int main(){
  string a, b;
  cin>>a>>b;
  for(int i=0; i<a.size(); i++){
    if(a[i]!=b[i])
      count++;
  }
  return count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'count' was not declared in this scope
    8 |       count++;
      |       ^~~~~
a.cc:10:10: error: 'count' was not declared in this scope
   10 |   return count;
      |          ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std ;
#define ll long long int
#define pb push_back
#define fi first 
#define se second 
#define mod 1000000007
/* Iterative Function to calculate (x^y) in O(log y) */
ll power(ll x, ll y) 
{ 
	int res = 1;	 // Initialize result 

	while (y > 0) 
	{ 
		// If y is odd, multiply x with result 
		if (y & 1) 
			res = res*x; 

		// y must be even now 
		y = y>>1; // y = y/2 
		x = x*x; // Change x to x^2 
	} 
	return res; 
}

int power(ll x, ll  y, ll p)  
{  
    ll res = 1;     // Initialize result  
  
    x = x % p; // Update x if it is more than or  
                // equal to p 
   
    if (x == 0) return 0; // In case x is divisible by p; 
  
    while (y > 0)  
    {  
        // If y is odd, multiply x with result  
        if (y & 1)  
            res = (res*x) % p;  
  
        // y must be even now  
        y = y>>1; // y = y/2  
        x = (x*x) % p;  
    }  
    return res;  
}
// vector<vector<ll>> v ;
// vector<ll> chld,bol,lst ;
// void dfs(ll a)
// {
//   lst.pb(a) ;
//   for(ll i=0;i<v[a].size();i++)
//   {
//     if(bol[v[a][i]]==0)
//     {
//       bol[v[a][i]]=1 ;
//       dfs(v[a][i]) ;
//     }
//   }
// }
// ll ch(ll a)
// {
//   ll p=0;
//   if(v[a].size()==0)
//   {
//     chld[a] =1 ;
//    return 1;
//   }
//   else
//   {
//     for(ll i=0;i<v[a].size();i++)
//     p += ch(v[a][i]) ;
//     p++ ;
//     chld[a] = p;
//     return p;
//   }
// }
int main()
{
  ll cnt=0;
  string s,t ;
  cin >> s >> t ;
  for(ll i=0;i<n;i++)if(s[i]!=t[i]) cnt++ ;
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:83:16: error: 'n' was not declared in this scope
   83 |   for(ll i=0;i<n;i++)if(s[i]!=t[i]) cnt++ ;
      |                ^
Language: C

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

int main(){
  string S, T;
  cin >> S >> T;
  int count = 0;
  for (int i = 0; i < S.length(); ++i){
    if (S[i] != T[i]) {
      ++count;
    }
  }
  cout << count;
  return 0;
}

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

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

typedef long long int ll;
typedef pair<int,int> pi;
priority_queue<pi, vector<pi>, greater<pi> > pq; //min heap

ll mini(ll a,ll b){	return a<b?a:b;}
ll maxi(ll a,ll b){	return a>b?a:b;}
ll gcd(ll a,ll b){	if(b == 0)	return a;return gcd(b,a%b);}
ll binpow(ll n,ll x){	ll ans = 1;while(x){if(x & 1)	ans *= n;n *= n;x >>= 1;}return ans;}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    string s,t;
    cin>>s>>t;
    int ch = 0;
    for(int i=0;i<n;++i)    if(s[i] != t[i])    ch++;

    cout<<ch<<"\n";

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: 'n' was not declared in this scope
   22 |     for(int i=0;i<n;++i)    if(s[i] != t[i])    ch++;
      |                   ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
  string s, t;
  cin >> s >> t;
  int len = s.size() = t.size();
  int cnt = 0;
  
  for(int i = 0; i < len; i++){
  if(s[i] != t[i])
    cnt++;
  }
  printf("%d\n", cnt);
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: lvalue required as left operand of assignment
    8 |   int len = s.size() = t.size();
      |             ~~~~~~^~
Language: C++

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
    int count=0;
    string S,T;
    cin>>S>>T
    int l1=s.length();
    int l2=t.length();
    for(int i=0;i<l1&&i<l2;i++)
    {
        if(S[i]!=T[i])
        {
            count++;
        }
    }
    cout<<count;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'int'
    8 |     cin>>S>>T
      |              ^
      |              ;
    9 |     int l1=s.length();
      |     ~~~       
a.cc:10:12: error: 't' was not declared in this scope
   10 |     int l2=t.length();
      |            ^
a.cc:11:19: error: 'l1' was not declared in this scope; did you mean 'l2'?
   11 |     for(int i=0;i<l1&&i<l2;i++)
      |                   ^~
      |                   l2
Language: C++

#include<iostream>
#include<math.h>
#included<string.h>
using namespace std;
int main()
{
    int count=0;
    string s,t;
    getline(cin,s);
    getline(cin,t);
    int l1=s.length();
    int l2=t.length();
    for(int i=0;i<l1&&i<l2;i++)
    {
        if(s[i]!=t[i])
        {
            count++;
        }
    }
    cout<<count;
}


Compiler output:
a.cc:3:2: error: invalid preprocessing directive #included; did you mean #include?
    3 | #included<string.h>
      |  ^~~~~~~~
      |  include
Language: C++

int minorchange(string S, string T)
{
	if (S.size() != T.size()) return 0;
	int count = 0;
	for (int i = 0; i < S.size(); i++)
	{
		if (S[i] != T[i])
		{
			T[i] = S[i];
			count++;
		}
	}
	return count;
}

int main()
{

	string s, t;
	cin >> s;
	cin >> t;
	int c = minorchange(s, t);
	cout << c << endl;
}

Compiler output:
a.cc:1:17: error: 'string' was not declared in this scope
    1 | int minorchange(string S, string T)
      |                 ^~~~~~
a.cc:1:27: error: 'string' was not declared in this scope
    1 | int minorchange(string S, string T)
      |                           ^~~~~~
a.cc:1:35: error: expression list treated as compound expression in initializer [-fpermissive]
    1 | int minorchange(string S, string T)
      |                                   ^
a.cc: In function 'int main()':
a.cc:19:9: error: 'string' was not declared in this scope
   19 |         string s, t;
      |         ^~~~~~
a.cc:20:9: error: 'cin' was not declared in this scope
   20 |         cin >> s;
      |         ^~~
a.cc:20:16: error: 's' was not declared in this scope
   20 |         cin >> s;
      |                ^
a.cc:21:16: error: 't' was not declared in this scope
   21 |         cin >> t;
      |                ^
a.cc:22:28: error: 'minorchange' cannot be used as a function
   22 |         int c = minorchange(s, t);
      |                 ~~~~~~~~~~~^~~~~~
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout << c << endl;
      |         ^~~~
a.cc:23:22: error: 'endl' was not declared in this scope
   23 |         cout << c << endl;
      |                      ^~~~
Language: C++

				/*****************************************************
 				*	Logged in : HABIBUR RAHMAN						 *
				*	Dept	  : COMPUTER SCIENCE AND ENGINEERING	 *
				*													 *
				*	KHULNA UNIVERSITY OF ENGINEERING AND TECHNOLOGY  *
				******************************************************/


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ull> vull;
typedef vector<string> vs;
typedef pair<ll,ll> pll;
#define fast_io 			ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define all(v) 				v.begin(),v.end()
#define allr(v) 			v.rbegin(),v.rend()
#define rep(i,a,b) 			for(ll i=a;i<=b;i++)
#define rep0(i,n)			for(ll i=0;i<n;i++)
#define rrep0(i, n) 		for(ll i=(ll)(n);i>0;--i)
#define rrep(i, a, b) 		for(ll i=(ll)(a);i>=(ll)(b);--i)
#define pb(z) 				push_back(z)
#define ff					first
#define ss 					second
#define caset 				int t;cin>>t;for(int tt=1;tt<=t;tt++)
#define sz(X) 				((ll)(X).size())
#define scan(X) 			scanf("%s", (X))
#define ms(v,val)			memset((v),(val),sizeof((v)))
#define ms0(X) 				memset((X), 0, sizeof((X)))
#define ms1(X) 				memset((X), -1, sizeof((X)))
#define m_p(a,b)            make_pair(a,b)
#define get_pos(c,x) 		(lower_bound(c.begin(),c.end(),x)-c.begin())
#define lcm(a,b)            (a*b)/__gcd(a,b)
#define INF9                1000000010
#define INF18               4000000000000000010
#define bpll(a)             __builtin_popcountll(a)
#define sqr(a)              ((a)*(a))
#define nl					"\n"
#define mod					1e9+7;
#define mx_el(v)			*max_element(all(v));
#define mn_el(v)			*min_element(all(v));
#define pcase(z,x)    		cout<<"Case "<<z<<": "<<x<<"\n"
const double pi = 2*acos(0) ;
#define display(v)			vi :: iterator it;for(it=(v).begin();it!=(v).end();it++){cout << *it << " " ;}cout << endl;
#define taking(n,v) 		for(ll i=0;i<(n);i++){ll inp;cin>>inp;(v).push_back(inp);}

void start(){
      #ifndef ONLINE_JUDGE 
      freopen("input.txt" , "r" , stdin) ;
      freopen("output.txt" , "w" , stdout) ;
      #endif
}
int lis(string &v){
	int n=sz(v),cnt=0;
	vector<int>dp(n,1);
	for(int i=0;i<n;i++){
		for(int j=0;j<i;j++){
			if(v[i]>v[j])dp[i]=max(dp[i],dp[j]+1);
		}
	}
	for(int i=0;i<n;i++){
		cnt=max(dp[i],cnt);
	}
	return cnt;
}
void solve()
{
 string s,t;cin>>s>>t;
 ll cnt=0;
 rep0(i,sz(s)){
 	if(s[i]!=t[i])cnt++;
 }
 cout << cnt << n;
}

int main() {
	//fast_io
	//start();
    //caset{
    	//cout << "Case " << tt << ": ";

		  solve();
	//}
	
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:77:17: error: 'n' was not declared in this scope
   77 |  cout << cnt << n;
      |                 ^
Language: C++

				/*****************************************************
 				*	Logged in : HABIBUR RAHMAN						 *
				*	Dept	  : COMPUTER SCIENCE AND ENGINEERING	 *
				*													 *
				*	KHULNA UNIVERSITY OF ENGINEERING AND TECHNOLOGY  *
				******************************************************/


#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ull> vull;
typedef vector<string> vs;
typedef pair<ll,ll> pll;
#define fast_io 			ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define all(v) 				v.begin(),v.end()
#define allr(v) 			v.rbegin(),v.rend()
#define rep(i,a,b) 			for(ll i=a;i<=b;i++)
#define rep0(i,n)			for(ll i=0;i<n;i++)
#define rrep0(i, n) 		for(ll i=(ll)(n);i>0;--i)
#define rrep(i, a, b) 		for(ll i=(ll)(a);i>=(ll)(b);--i)
#define pb(z) 				push_back(z)
#define ff					first
#define ss 					second
#define caset 				int t;cin>>t;for(int tt=1;tt<=t;tt++)
#define sz(X) 				((ll)(X).size())
#define scan(X) 			scanf("%s", (X))
#define ms(v,val)			memset((v),(val),sizeof((v)))
#define ms0(X) 				memset((X), 0, sizeof((X)))
#define ms1(X) 				memset((X), -1, sizeof((X)))
#define m_p(a,b)            make_pair(a,b)
#define get_pos(c,x) 		(lower_bound(c.begin(),c.end(),x)-c.begin())
#define lcm(a,b)            (a*b)/__gcd(a,b)
#define INF9                1000000010
#define INF18               4000000000000000010
#define bpll(a)             __builtin_popcountll(a)
#define sqr(a)              ((a)*(a))
#define nl					"\n"
#define mod					1e9+7;
#define mx_el(v)			*max_element(all(v));
#define mn_el(v)			*min_element(all(v));
#define pcase(z,x)    		cout<<"Case "<<z<<": "<<x<<"\n"
const double pi = 2*acos(0) ;
#define display(v)			vi :: iterator it;for(it=(v).begin();it!=(v).end();it++){cout << *it << " " ;}cout << endl;
#define taking(n,v) 		for(ll i=0;i<(n);i++){ll inp;cin>>inp;(v).push_back(inp);}

void start(){
      #ifndef ONLINE_JUDGE 
      freopen("input.txt" , "r" , stdin) ;
      freopen("output.txt" , "w" , stdout) ;
      #endif
}
int lis(string &v){
	int n=sz(v),cnt=0;
	vector<int>dp(n,1);
	for(int i=0;i<n;i++){
		for(int j=0;j<i;j++){
			if(v[i]>v[j])dp[i]=max(dp[i],dp[j]+1);
		}
	}
	for(int i=0;i<n;i++){
		cnt=max(dp[i],cnt);
	}
	return cnt;
}
void solve()
{
 string s,t;cin>>s>>t;
 ll cnt=0;
 rep0(i,sz(s)){
 	if(s[i]!=t[i])cnt++;
 }
 cout << cnt << n;
}

int main() {
	fast_io
	//start();
    //caset{
    	//cout << "Case " << tt << ": ";

		  solve();
	//}
	
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:77:17: error: 'n' was not declared in this scope
   77 |  cout << cnt << n;
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x)(x).begin(), (x).end() // 昇順ソート
#define rall(v)(v).rbegin(), (v).rend() // 降順ソート
#define INF 1LL << 60
typedef long long int LL;
typedef long long int ll;
#define pll pair < ll, ll >
#define F first
#define S second
const int MOD = 1000000007;
template < class T > bool chmax(T & a,const T & b) { if (a < b) { a = b; return true; } return false; }
template < class T > bool chmin(T & a,const T & b) { if (a > b) { a = b; return true; } return false; }
// 任意のlogは　対数の底の変換を使う    log(N) / log(任意の底)

int main() {
    string S;
    strind T;
    cin >> S >> T;
    int ct = 0;
    rep(i,S.size()){
        if(S[i] == T[i])ct++;
    }

    cout << ct << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'strind' was not declared in this scope; did you mean 'strtod'?
   19 |     strind T;
      |     ^~~~~~
      |     strtod
a.cc:20:17: error: 'T' was not declared in this scope
   20 |     cin >> S >> T;
      |                 ^
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;

int main() {
  string s, t;
  cin >> s >> t;
  
  int counter = 0;
  rep (i, s.size()) {
    if (s[i] != t[i]) counter++
  }
  
  cout << counter << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:32: error: expected ';' before '}' token
   11 |     if (s[i] != t[i]) counter++
      |                                ^
      |                                ;
   12 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;

int main() {
  string s, t;
  cin >> s >> t;
  
  int counter = 0;
  rep (i, s.size()) {
    if (s[i] != t[i]) counter++
  }
  
  cout << counter << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:32: error: expected ';' before '}' token
   11 |     if (s[i] != t[i]) counter++
      |                                ^
      |                                ;
   12 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++;)
using namespace std;

int main() {
  string s, t;
  cin >> s >> t;
  
  int counter = 0;
  rep (i, s.size()) {
    if (s[i] != t[i]) counter++
  }
  
  cout << counter << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:44: error: expected ')' before ';' token
    2 | #define rep(i, n) for(int i = 0; i < n; i++;)
      |                      ~                     ^
a.cc:10:3: note: in expansion of macro 'rep'
   10 |   rep (i, s.size()) {
      |   ^~~
a.cc:2:45: error: expected primary-expression before ')' token
    2 | #define rep(i, n) for(int i = 0; i < n; i++;)
      |                                             ^
a.cc:10:3: note: in expansion of macro 'rep'
   10 |   rep (i, s.size()) {
      |   ^~~
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) = for(int i = 0; i < n; i++;)
using namespace std;

int main() {
  string s, t;
  cin >> s >> t;
  
  counter = 0;
  rep (i, s.size()) {
    if (s[i] != t[i]) counter++
  }
  
  cout << counter << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'counter' was not declared in this scope
    9 |   counter = 0;
      |   ^~~~~~~
a.cc:2:19: error: expected primary-expression before '=' token
    2 | #define rep(i, n) = for(int i = 0; i < n; i++;)
      |                   ^
a.cc:10:3: note: in expansion of macro 'rep'
   10 |   rep (i, s.size()) {
      |   ^~~
a.cc:2:21: error: expected primary-expression before 'for'
    2 | #define rep(i, n) = for(int i = 0; i < n; i++;)
      |                     ^~~
a.cc:10:3: note: in expansion of macro 'rep'
   10 |   rep (i, s.size()) {
      |   ^~~
a.cc:10:8: error: 'i' was not declared in this scope
   10 |   rep (i, s.size()) {
      |        ^
a.cc:2:36: note: in definition of macro 'rep'
    2 | #define rep(i, n) = for(int i = 0; i < n; i++;)
      |                                    ^
a.cc:2:47: error: expected primary-expression before ')' token
    2 | #define rep(i, n) = for(int i = 0; i < n; i++;)
      |                                               ^
a.cc:10:3: note: in expansion of macro 'rep'
   10 |   rep (i, s.size()) {
      |   ^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	const NUM = 2000000;
	char S[NUM],T[NUM];
	cin >> S >> T;
	int a = 0;
	for(int i = 0; S[i] != '\0'; i++){
		if(S[i] != T[i]){
			a = a + 1;
        }
    }
  	cout << a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: 'NUM' does not name a type
    5 |         const NUM = 2000000;
      |               ^~~
a.cc:6:16: error: 'NUM' was not declared in this scope
    6 |         char S[NUM],T[NUM];
      |                ^~~
a.cc:7:16: error: 'S' was not declared in this scope
    7 |         cin >> S >> T;
      |                ^
a.cc:7:21: error: 'T' was not declared in this scope
    7 |         cin >> S >> T;
      |                     ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  string s;
  string t;
  cin s;
  cin t;
  int ans = 0;
  for (i=0; i<s.size(); i++){
    if (s[i] != t[i]){
      ans++
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 's'
    7 |   cin s;
      |      ^~
      |      ;
a.cc:8:6: error: expected ';' before 't'
    8 |   cin t;
      |      ^~
      |      ;
a.cc:10:8: error: 'i' was not declared in this scope
   10 |   for (i=0; i<s.size(); i++){
      |        ^
a.cc:12:12: error: expected ';' before '}' token
   12 |       ans++
      |            ^
      |            ;
   13 |     }
      |     ~
Language: C++

#include <iostream>

using namespace std;

int main(){
  string s,t;
  cin>>s>>t;
  if(s==t){
    cout<<"0";
  }
  int answer=0;
  for(int i=0;i<s.length();i++){
    if(s[i]!=t[i]){
      count++;
    }
  cout<<count;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'count' was not declared in this scope
   14 |       count++;
      |       ^~~~~
a.cc:16:9: error: 'count' was not declared in this scope
   16 |   cout<<count;
      |         ^~~~~
a.cc:16:15: error: expected '}' at end of input
   16 |   cout<<count;
      |               ^
a.cc:12:32: note: to match this '{'
   12 |   for(int i=0;i<s.length();i++){
      |                                ^
a.cc:16:15: error: expected '}' at end of input
   16 |   cout<<count;
      |               ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<isotream>
#include<math.h>
using namespace std;
int main(){
  string s,s1;
 cin>>s>>s1;
  int cnt=0;
  for(int i=0;i<s.size();i++){
    if(s[i]!=s1[i]){
      cnt++;
    }
    
  }
  cout<<cnt<<endl;
}


Compiler output:
a.cc:1:9: fatal error: isotream: No such file or directory
    1 | #include<isotream>
      |         ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class minorChange {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next(), t = sc.next();
		int diffCount = 0;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) != t.charAt(i))
				++diffCount;
		}
		System.out.println(diffCount);
		sc.close();
	}
}


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

#include <bits/stdc++.h>
#define int long long
#define REP(i,n) for(int i=0; i<n; ++i)
using namespace std;
typedef string str;
template<class T> using vec = vector<T>;
template<class T> using uset = unordered_set<T>;
template<class T, class S> using umap = unordered_map<T, S>;
template<class T> using pqueue =  priority_queue<T>;
template<class T> using flist = forward_list<T>;
const int mbs = sizeof(bitset<1>)*8;
template<int N> using bits = bitset<mbs*((N+mbs-1)/mbs)>;

const int MOD = 1000000007; // 10^9 + 7
const double PI = 3.14159265358979323846;
const int N = 1000000; // 10^6

main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	str s,t;
	cin>>s>>t;
	int ans=0;
	rep(i,s.size())
		if(s[i]!=t[i]) ans++;
	cout<<ans;
}

Compiler output:
a.cc:18:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   18 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:25:13: error: 'i' was not declared in this scope
   25 |         rep(i,s.size())
      |             ^
a.cc:25:9: error: 'rep' was not declared in this scope
   25 |         rep(i,s.size())
      |         ^~~
Language: C++

#include <iostream>
#include <string>
#include <sstream>

#define ll long long
#define nl '\n'

using namespace std;

int main() {
    #ifndef ONLINE_JUDGE
       freopen("input.txt", "r", stdin);
    #endif
    string a, b;
    cin >> a >> b;
    int l = a.size();
    int count = 0;
    for(int i = 0; i < l i++)
        if(a[i] != b[i])
            count++;
    cout << count << nl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: expected ';' before 'i'
   18 |     for(int i = 0; i < l i++)
      |                         ^~
      |                         ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    string s, t;
    cin >> s;
    cin >> t;

    int i,ans = 0;

    for( i = 0; i < s.length(); i++ )
        if( s[ i ] != t[ i ] )
            ans++;
    
    cout << ans << "\n";

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: expected '}' at end of input
   15 |     cout << ans << "\n";
      |                         ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C

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

int main(void){
  char a[10000],b[10000];
  int k;
  scanf("%s",a);
  scanf("%s",b);
  int n=strlen(a)
  for(int i=0;i<n;i++){
    if(a[i]!=b[i])k++;
  }
  printf("%d\n",k);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:3: error: expected ',' or ';' before 'for'
   10 |   for(int i=0;i<n;i++){
      |   ^~~
main.c:10:15: error: 'i' undeclared (first use in this function)
   10 |   for(int i=0;i<n;i++){
      |               ^
main.c:10:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:22: error: expected ';' before ')' token
   10 |   for(int i=0;i<n;i++){
      |                      ^
      |                      ;
main.c:10:22: error: expected statement before ')' token
Language: C

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

int main(void){
  char a[],b[];
  int k;
  scanf("%s",a);
  scanf("%s",b);
  int n=strlen(a)
  for(int i=0;i<n;i++){
    if(a[i]!=b[i])k++;
  }
  printf("%d\n",k);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:8: error: array size missing in 'a'
    5 |   char a[],b[];
      |        ^
main.c:5:12: error: array size missing in 'b'
    5 |   char a[],b[];
      |            ^
main.c:10:3: error: expected ',' or ';' before 'for'
   10 |   for(int i=0;i<n;i++){
      |   ^~~
main.c:10:15: error: 'i' undeclared (first use in this function)
   10 |   for(int i=0;i<n;i++){
      |               ^
main.c:10:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:22: error: expected ';' before ')' token
   10 |   for(int i=0;i<n;i++){
      |                      ^
      |                      ;
main.c:10:22: error: expected statement before ')' token
Language: C++

#include <iostream>
using namespace std;
int main() {
  string s,t; cin >> s >> t;
  cout << abs(s-t) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
    5 |   cout << abs(s-t) << endl;
      |               ~^~
      |               | |
      |               | basic_string<[...]>
      |               basic_string<[...]>
In file included from /usr/include/c++/14/string:48,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:5:17: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
    5 |   cout << abs(s-t) << endl;
      |                 ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:5:17: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
    5 |   cout << abs(s-t) << endl;
      |                 ^
Language: C++

#include <iostream>
using namespace std;
 
int main(){
	String S,T;
	cin >> S >> T;
	int a = 0;
	for(int i = 0; i < S.length; i++){
		if(S[i] != T[i]){
			a++;
        }
    }
	cout << a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'String' was not declared in this scope
    5 |         String S,T;
      |         ^~~~~~
a.cc:6:16: error: 'S' was not declared in this scope
    6 |         cin >> S >> T;
      |                ^
a.cc:6:21: error: 'T' was not declared in this scope
    6 |         cin >> S >> T;
      |                     ^
Language: C++

#include <iostream>
using namespace std;
 
int main(){
	const int num = 200000;
	String S[num],T[num];
	cin >> S;
	cin >> T;
	int a;
	for(int i = 0; S[i] != '\0'; i++){
		if(S[i] != T[i]){
			a++;
        }
    }
	cout << a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'String' was not declared in this scope
    6 |         String S[num],T[num];
      |         ^~~~~~
a.cc:7:16: error: 'S' was not declared in this scope
    7 |         cin >> S;
      |                ^
a.cc:8:16: error: 'T' was not declared in this scope
    8 |         cin >> T;
      |                ^
Language: C++

#include <iostream>
using namespace std;
 
int main(){
	String S[254],T[254];
	cin >> S;
	cin >> T;
	int a = 0;
	for(int i = 0; S[i] != '\0'; i++){
		if(S[i] != T[i]){
			a++;
        }
    }
	cout << a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'String' was not declared in this scope
    5 |         String S[254],T[254];
      |         ^~~~~~
a.cc:6:16: error: 'S' was not declared in this scope
    6 |         cin >> S;
      |                ^
a.cc:7:16: error: 'T' was not declared in this scope
    7 |         cin >> T;
      |                ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	String S[254],T[254];
	cin >> S;
	cin >> T;
	int a;
	for(int i = 0; S[i] != '\0'; i++){
		if(S[i] != T[i]){
			a++;
        }
    }
	cout << a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'String' was not declared in this scope
    5 |         String S[254],T[254];
      |         ^~~~~~
a.cc:6:16: error: 'S' was not declared in this scope
    6 |         cin >> S;
      |                ^
a.cc:7:16: error: 'T' was not declared in this scope
    7 |         cin >> T;
      |                ^