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

public class Main {

        public static void insertSort(int arr[]){
            for (int i = 1; i < arr.length; i++){
                for (int j = i-1; j >= 0 && arr[j] > arr[j+1]; j--){
                        swap(arr,j,j+1);
                }
                printArray(arr);
            }
        }

        public static void swap(int arr[], int i , int j){
            int tmp = arr[i];
            arr[i] = arr[j];
            arr[j] = tmp;
        }

        public static void printArray(int []arr){
            for (int i = 0; i < arr.length; i++){
                System.out.print(arr[i] + " ");
            }
            System.out.println();
        }

        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            int N = in.nextInt();
            int[] arr = new int[N];
            for (int j = 0; j < N; j++){
                for (int i = 0; i < arr.length; i++) {
                    arr[i] = in.nextInt();
                }
                insertSort(arr);
                printArray(arr);
            }
        }
    }


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

def main():
    n = int( input() )
    A = [int(i) for i in input().split()]

    for i in range(1, n):
        v = A[i]
        j = i - 1
        while j >= 0 and A[j] > v:
            A[j + 1] = A[j]
            j -= 1
        A[j + 1] = v
        print(A)

if __name__ == '__main__':
    main()



Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
def main():
^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: ';' expected
def main():
          ^
Main.java:2: error: class, interface, enum, or record expected
    n = int( input() )
        ^
Main.java:14: error: unclosed character literal
if __name__ == '__main__':
               ^
Main.java:14: error: unclosed character literal
if __name__ == '__main__':
                        ^
5 errors
Language: Java

n = int( input() )
A = [int(i) for i in input().split()]

print(A)

for i in range(1, n):
    v = A[i]
    j = i - 1
    while j >= 0 and A[j] > v:
        A[j + 1] = A[j]
        j -= 1
    A[j + 1] = v
    print(A)



Compiler output:
Main.java:1: error: class, interface, enum, or record expected
n = int( input() )
^
1 error
Language: Java

        public static void insertSort(int arr[]) {
           for (int i = 0; i < arr.length; i++){
               int v = arr[i];
               int j = i - 1;
               while (j >= 0 && arr[j] > v){
                   arr[j+1] = arr[j];
                   j--;
               }
               arr[j+1] = v;
               printArray(arr);
           }
        }

        public static void swap(int arr[], int i , int j){
            int tmp = arr[i];
            arr[i] = arr[j];
            arr[j] = tmp;
        }

        public static void printArray(int []arr){
            for (int i = 0; i < arr.length; i++){
                System.out.print(arr[i] + " ");
            }
            System.out.println();
        }

        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            int N = in.nextInt();
            if (N >= 1 && N <= 100) {
                int[] arr = new int[N];
                for (int j = 0; j < N; j++) {
                    for (int i = 0; i < arr.length; i++) {
                        arr[i] = in.nextInt();
                    }
                    insertSort(arr);
                }
                in.close();
            }
        }
    }


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
        public static void insertSort(int arr[]) {
                      ^
  (use --enable-preview to enable unnamed classes)
Main.java:41: error: class, interface, enum, or record expected
    }
    ^
2 errors
Language: Java

#include <stdio.h>

main(){

  int i = 0, j = 0, k = 0;
  int A = [101];
  int N = 1;
  int key = 0;

  scanf("%d",&n);
  while(NULL != scanf("%d",&A[j])){
    j++;
  }

  for (j=0;j<=N;j++){
    key = A[j];
    i = j - 1;
    while ((i>0) && (A[i]>key)){
      A[i+1] = A[i];
      i = i - 1;
    }
    A[i+1] = key;
    for (k=0;k<=N;k++){
      printf("%d ",&A[k]);
    }
    printf("\n");
  }

}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:6: error: unnamed classes are a preview feature and are disabled by default.
  int A = [101];
  ^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: illegal start of expression
  int A = [101];
          ^
Main.java:10: error: class, interface, enum, or record expected
  scanf("%d",&n);
  ^
Main.java:11: error: class, interface, enum, or record expected
  while(NULL != scanf("%d",&A[j])){
  ^
Main.java:13: error: class, interface, enum, or record expected
  }
  ^
Main.java:15: error: class, interface, enum, or record expected
  for (j=0;j<=N;j++){
           ^
Main.java:15: error: class, interface, enum, or record expected
  for (j=0;j<=N;j++){
                ^
Main.java:17: error: class, interface, enum, or record expected
    i = j - 1;
    ^
Main.java:18: error: class, interface, enum, or record expected
    while ((i>0) && (A[i]>key)){
    ^
Main.java:20: error: class, interface, enum, or record expected
      i = i - 1;
      ^
Main.java:21: error: class, interface, enum, or record expected
    }
    ^
Main.java:23: error: class, interface, enum, or record expected
    for (k=0;k<=N;k++){
    ^
Main.java:23: error: class, interface, enum, or record expected
    for (k=0;k<=N;k++){
             ^
Main.java:23: error: class, interface, enum, or record expected
    for (k=0;k<=N;k++){
                  ^
Main.java:25: error: class, interface, enum, or record expected
    }
    ^
Main.java:27: error: class, interface, enum, or record expected
  }
  ^
18 errors
Language: Java

#include <stdio.h>

main(){

  int i = 0, j = 0, k = 0;
  int A[101];
  int N = 1;
  int key = 0;

  scanf("%d",&N);
  while(EOF != scanf("%d",&A[j])){
    j++;
  }

  for (j=0;j<=N;j++){
    key = A[j];
    i = j - 1;
    while ((i>0) && (A[i]>key)){
      A[i+1] = A[i];
      i = i - 1;
    }
    A[i+1] = key;
    for (k=0;k<=N;k++){
      printf("%d ",A[k]);
    }
    printf("\n");
  }

}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:6: error: class, interface, enum, or record expected
  int A[101];
  ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
  int N = 1;
  ^
  (use --enable-preview to enable unnamed classes)
Main.java:10: error: class, interface, enum, or record expected
  scanf("%d",&N);
  ^
Main.java:11: error: class, interface, enum, or record expected
  while(EOF != scanf("%d",&A[j])){
  ^
Main.java:13: error: class, interface, enum, or record expected
  }
  ^
Main.java:15: error: class, interface, enum, or record expected
  for (j=0;j<=N;j++){
           ^
Main.java:15: error: class, interface, enum, or record expected
  for (j=0;j<=N;j++){
                ^
Main.java:17: error: class, interface, enum, or record expected
    i = j - 1;
    ^
Main.java:18: error: class, interface, enum, or record expected
    while ((i>0) && (A[i]>key)){
    ^
Main.java:20: error: class, interface, enum, or record expected
      i = i - 1;
      ^
Main.java:21: error: class, interface, enum, or record expected
    }
    ^
Main.java:23: error: class, interface, enum, or record expected
    for (k=0;k<=N;k++){
    ^
Main.java:23: error: class, interface, enum, or record expected
    for (k=0;k<=N;k++){
             ^
Main.java:23: error: class, interface, enum, or record expected
    for (k=0;k<=N;k++){
                  ^
Main.java:25: error: class, interface, enum, or record expected
    }
    ^
Main.java:27: error: class, interface, enum, or record expected
  }
  ^
18 errors
Language: Java

import java.io.*;
import java.util.*;

public class InsertionSort {

    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
    private static StringTokenizer st;

    public static void main ( String [] args ) throws IOException
    {
	new InsertionSort().cal();
    }

 
    private void cal() throws IOException 
    {
	int N = Integer.parseInt(br.readLine());
	int [] n = new int[N];
	st = new StringTokenizer(br.readLine());

	for(int i = 0; i < N; i++)
	    n[i] = Integer.parseInt(st.nextToken());

	printArray(n);
	for(int j = 1; j < n.length; j++) {
	    int key = n[j];
	    int i = j-1;
	    while( i >= 0 && n[i] > key ) {
		n[i+1] = n[i];
		i--;
	    }
	    n[i+1] = key;

	    printArray(n);
	}
    }
    
    private void printArray(int [] A) {
	for(int i = 0; i < A.length; i++) {
	    if ( i > 0 ) System.out.print(" ");
	    System.out.print(A[i]);
	}
	System.out.println("");
    }

}

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

import java.io.*;
import java.util.*;

public class A {

    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
    private static StringTokenizer st;

    public static void main ( String [] args ) throws IOException
    {
	new A().cal();
    }

 
    private void cal() throws IOException 
    {
	int N = Integer.parseInt(br.readLine());
	int [] n = new int[N];
	st = new StringTokenizer(br.readLine());

	for(int i = 0; i < N; i++)
	    n[i] = Integer.parseInt(st.nextToken());

	printArray(n);
	for(int j = 1; j < n.length; j++) {
	    int key = n[j];
	    int i = j-1;
	    while( i >= 0 && n[i] > key ) {
		n[i+1] = n[i];
		i--;
	    }
	    n[i+1] = key;

	    printArray(n);
	}
    }
    
    private void printArray(int [] A) {
	for(int i = 0; i < A.length; i++) {
	    if ( i > 0 ) System.out.print(" ");
	    System.out.print(A[i]);
	}
	System.out.println("");
    }

}

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

public class InsertionSort {
 
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
    private static StringTokenizer st;
 
    public static void main ( String [] args ) throws IOException
    {
    new InsertionSort().cal();
    }
 
  
    private void cal() throws IOException 
    {
    int N = Integer.parseInt(br.readLine());
    int [] n = new int[N];
    st = new StringTokenizer(br.readLine());
 
    for(int i = 0; i < N; i++)
        n[i] = Integer.parseInt(st.nextToken());
 
    printArray(n);
    for(int j = 1; j < n.length; j++) {
        int key = n[j];
        int i = j-1;
        while( i >= 0 && n[i] > key ) {
        n[i+1] = n[i];
        i--;
        }
        n[i+1] = key;
 
        printArray(n);
    }
    }
     
    private void printArray(int [] A) {
    for(int i = 0; i < A.length; i++) {
        if ( i > 0 ) System.out.print(" ");
        System.out.print(A[i]);
    }
    System.out.println("");
    }
 
}

Compiler output:
Main.java:1: error: class InsertionSort is public, should be declared in a file named InsertionSort.java
public class InsertionSort {
       ^
Main.java:3: error: cannot find symbol
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
                   ^
  symbol:   class BufferedReader
  location: class InsertionSort
Main.java:4: error: cannot find symbol
    private static StringTokenizer st;
                   ^
  symbol:   class StringTokenizer
  location: class InsertionSort
Main.java:6: error: cannot find symbol
    public static void main ( String [] args ) throws IOException
                                                      ^
  symbol:   class IOException
  location: class InsertionSort
Main.java:12: error: cannot find symbol
    private void cal() throws IOException 
                              ^
  symbol:   class IOException
  location: class InsertionSort
Main.java:3: error: cannot find symbol
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
                                           ^
  symbol:   class BufferedReader
  location: class InsertionSort
Main.java:3: error: cannot find symbol
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
                                                              ^
  symbol:   class InputStreamReader
  location: class InsertionSort
Main.java:16: error: cannot find symbol
    st = new StringTokenizer(br.readLine());
             ^
  symbol:   class StringTokenizer
  location: class InsertionSort
8 errors
Language: Java

public class Main {
 
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
    private static StringTokenizer st;
 
    public static void main ( String [] args ) throws IOException
    {
    new Main().cal();
    }
 
  
    private void cal() throws IOException 
    {
    int N = Integer.parseInt(br.readLine());
    int [] n = new int[N];
    st = new StringTokenizer(br.readLine());
 
    for(int i = 0; i < N; i++)
        n[i] = Integer.parseInt(st.nextToken());
 
    printArray(n);
    for(int j = 1; j < n.length; j++) {
        int key = n[j];
        int i = j-1;
        while( i >= 0 && n[i] > key ) {
        n[i+1] = n[i];
        i--;
        }
        n[i+1] = key;
 
        printArray(n);
    }
    }
     
    private void printArray(int [] A) {
    for(int i = 0; i < A.length; i++) {
        if ( i > 0 ) System.out.print(" ");
        System.out.print(A[i]);
    }
    System.out.println("");
    }
 
}

Compiler output:
Main.java:3: error: cannot find symbol
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
                   ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
    private static StringTokenizer st;
                   ^
  symbol:   class StringTokenizer
  location: class Main
Main.java:6: error: cannot find symbol
    public static void main ( String [] args ) throws IOException
                                                      ^
  symbol:   class IOException
  location: class Main
Main.java:12: error: cannot find symbol
    private void cal() throws IOException 
                              ^
  symbol:   class IOException
  location: class Main
Main.java:3: error: cannot find symbol
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
                                           ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
    private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));    
                                                              ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:16: error: cannot find symbol
    st = new StringTokenizer(br.readLine());
             ^
  symbol:   class StringTokenizer
  location: class Main
7 errors
Language: Java

import java.util.*;
class A {
	Scanner sc = new Scanner(System.in);
	private void p(Object...os) { System.out.println(Arrays.deepToString(os)); }
	public static void main(String...args) {
		new ProblemA().start();
	}
	private void start() {
		int stop = sc.nextInt();
		int[] list = new int[stop];
		for(int i = 0; i < stop; i++) list[0] = sc.nextInt();

		int work, j;
		for(int i = 2; i < list.length; i++) {
			work = list[i];
			list[0] = work;
			j = i - 1;
			while(work < list[i]) {
				list[j + 1] = list[j];
				j = j - 1;
			}
			list[j + 1] = work;
		}
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		new ProblemA().start();
		    ^
  symbol:   class ProblemA
  location: class A
1 error
Language: Java

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


public class Lesson1 {

    static int len;
    static int[] arr;
    
    /**
     * @param args
     * @throws IOException 
     */
    public static void main(String[] args) throws IOException {
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        int len = Integer.parseInt(reader.readLine());
        int[] arr = new int[len];
        
        String arrStr = reader.readLine();
        StringTokenizer tokenizer = new StringTokenizer(arrStr, " ");
        
        int i = 0;
        while (tokenizer.hasMoreElements()) {
           arr[i++] = Integer.parseInt((String) tokenizer.nextElement());
        }
        
//        System.out.println("len" + len);
//        System.out.println("arr" + Arrays.toString(arr));
        
        reader.close();
        
        
        sort(arr);
    }
    
    public static void sort(int[] arr){
        
        printArr(arr);
        
        for (int i = 1; i < arr.length; i++) {
            
            for (int j = i; j >= 1; j--) {
                
                int current = arr[j];
                int prev = arr[j - 1];
                
                if(current < prev){
                    swap(arr, j - 1, j);                
                }
                else{
                    break;
                }
            }
            
            printArr(arr);
        }
    }
    
    public static void swap(int[] arr, int from, int to){
        int temp = arr[from];
        arr[from] =  arr[to];
        arr[to] = temp;
     }
    
    
    static void printArr(int[] arr){
        String msg = "";
        for (int i = 0; i < arr.length; i++) {
            msg += arr[i];
            msg += " ";
        }
        
        System.out.println(arr);
    }
}

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

import java.util.Scanner;

public class Main2 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] num = new int[n];
		for(int i = 0; i < n; i++)
			num[i] = sc.nextInt();
		for(int j = 0; j < n; j++){
			System.out.print(num[j]);
			if(j < n - 1)
				System.out.print(" ");
		}
		System.out.println();
		for(int i = 1; i < n; i++){
			for(int j = 0; j < i; j++){
				if(num[i] < num[j]){
					int temp = num[j];
					num[j] = num[i];
					num[i] = temp;
				}
			}
			for(int j = 0; j < n; j++){
				System.out.print(num[j]);
				if(j < n - 1)
					System.out.print(" ");
			}
			if(i != n-1)
				System.out.println();
		}
	}
}

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

package aoj;
import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;

public class Main1 {
	public static void main(String args[]) throws IOException {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int A[] = new int[n];
		for (int i = 0; i < n; i++) {
			A[i] = scanner.nextInt();
		}

		System.out.println(Arrays.toString(A).replaceAll("[,\\[\\]]", ""));
		for (int j = 1; j < A.length; j++) {
			int key = A[j];
			int i = j - 1;
			while (i >= 0 && A[i] > key) {
				A[i + 1] = A[i];
				i--;
			}
			A[i + 1] = key;
			System.out.println(Arrays.toString(A).replaceAll("[,\\[\\]]", ""));
		}
	}
}

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

package Vol0;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class InsertionSort {

	private static int N;
	private static int[] A;

	public static void main(String args[]) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		N = Integer.parseInt(br.readLine());

		String[] arrays = br.readLine().split(" ");
		A = new int[N];
		for (int i = 0, idx = 0; i < arrays.length; i++) {
			if(arrays[i].length() == 0) continue;
			A[idx++] = Integer.parseInt(arrays[i].trim());
		}
        System.out.println(Arrays.toString(A).replaceAll("[,\\[\\]]", ""));
        for (int j = 1; j < A.length; j++) {
            int key = A[j];
            int i = j - 1;
            while (i >= 0 && A[i] > key) {
                A[i + 1] = A[i];
                i--;
            }
            A[i + 1] = key;
            System.out.println(Arrays.toString(A).replaceAll("[,\\[\\]]", ""));
        }
//		System.out.println(Arrays.toString(A).replaceAll("[,\\[\\]]", ""));
//		try {
//		// 挿入ソート
//		for (int i = 1; i < N; i++) {
//			for (int j = i; j >= 1 && A[j] < A[j - 1]; j--) {
//				long tmp = A[j];
//				A[j] = A[j - 1];
//				A[j - 1] = tmp;
//			}
//			System.out.print(A[0]);
//			for (int j = 1; j < N; j++) {
//				System.out.print(" " + A[j]);
//			}
//			System.out.println("");
//
//		}
//		} catch(Exception e){
//			
//		}
	}
}

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

import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;
  
public class Main {
	private static int N;
	private static int[] A;
    public static void main(String args[]) throws IOException {

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

		N = Integer.parseInt(br.readLine());

		String[] arrays = br.readLine().split(" ");
		A = new int[N];
		for (int i = 0, idx = 0; i < arrays.length; i++) {
			if(arrays[i].length() == 0) continue;
			A[idx++] = Integer.parseInt(arrays[i].trim());
		}
  
        System.out.println(Arrays.toString(A).replaceAll("[,\\[\\]]", ""));
        for (int j = 1; j < A.length; j++) {
            int key = A[j];
            int i = j - 1;
            while (i >= 0 && A[i] > key) {
                A[i + 1] = A[i];
                i--;
            }
            A[i + 1] = key;
            System.out.println(Arrays.toString(A).replaceAll("[,\\[\\]]", ""));
        }
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:10: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:10: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: Java

mport java.util.Scanner;

public class Main {

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

		int n = sc.nextInt();
		int[] data = new int[n];
    	for (int i = 0; i < n; i++) {
    		data[i] = sc.nextInt();
    	}
    	
    	for (int i = 1; i < n; i++) {
    		printData(data);

    		int key = data[i];
    		int j = i - 1;
    		for (; j >= 0 && data[j] > key; j--) {
    			data[j + 1] = data[j];
    		}
    		data[j + 1] = key;
    		
    	}
		
    	printData(data);
    	
        sc.close();
	}

	private static void printData(int[] data) {
		StringBuffer printData = new StringBuffer();
		for (int i = 0; i < data.length; i++) {
			printData.append(data[i]);
			printData.append(" ");
		}
		printData.delete(printData.length() - 1, printData.length());
		System.out.println(printData);
	}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: Java

import java.io.*;
import java.util.StringTokenizer;
public class InsertionSort {
    public static void insertSort(int[] arr){
        int i,j;
        for(i=1; i<arr.length; i++){
            int tmp = arr[i];
            for(j= i-1; j>=0; j--){
                if(arr[j] < tmp){
                    break;
                }
                arr[j+1] = arr[j];
            }
            arr[j+1] = tmp;
            for(int l=0; l<arr.length; l++){
                System.out.print(arr[l] + " ");
            }
            System.out.println("");
        }
    }
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String str = br.readLine();
		int[] data = new int[n];
		StringTokenizer tokenizer = new StringTokenizer(str, " ");
	    int i = 0;
	    while (tokenizer.hasMoreElements()) {
	    	data[i++] = Integer.parseInt((String) tokenizer.nextElement());
	    }
        for(i=0; i<data.length; i++){
            System.out.print(data[i] + " ");
        }
	    insertSort(data);
	}

}

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

#include<iostream>
using namespace std;
int main()
{
	int n, a[100], tmp, j;
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < n; i++)
	{
		tmp = a[i];
		for (j = i - 1; j >= 0 && tmp < a[j]; j--)
			a[j + 1] = a[j];
		a[j + 1] = tmp;
		for (int j = 0; j < n; j++) {
			if (j)
				cout << " ";
			cout << a[j];
		}
		cout << endl;
	}
	return 0;
}


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

import java.util.*;
class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int N = sc.nextInt();
	int A[] = new int[N];
	int i,j,v;
	for(i = 0; i < N; i++)
	    A[i] = sc.nextInt();
	for(i = 0; i < N; i++){
	    v = A[i];
	    j = i - 1;
	    while(j >= 0 && A[j] > v){
		A[j+1] = A[j];
		j--;
		A[j+1] = v;
	    }
	    for(int a : A) System.out.print(a + " ");
	    System.out.println(); 
	}
    }
}


Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
main.c:2:1: error: unknown type name 'class'
    2 | class Main{
      | ^~~~~
main.c:2:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    2 | class Main{
      |           ^
Language: C

#include <stdio.h>
const int n = 100;
void insertionSort(A, N);


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

  insertionSort(A, N);

  return 0;
}

void insertionSort(A, N){
  int i;
  for(i = 1; i < N-1; i++){
    j = i-1;
    v = A[i];
    while(j >= 0 && A[j] > v){
      A[j+1] = A[j];
      j--;
    }
    A[j+1] = v;
    for(i = 0; i < N-1; i++){
      printf("%d", A[i]);
      if(i == N-1) printf("\n");
    }
  }
}



Compiler output:
main.c:3:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
    3 | void insertionSort(A, N);
      | ^~~~
main.c: In function 'insertionSort':
main.c:19:6: error: type of 'A' defaults to 'int' [-Wimplicit-int]
   19 | void insertionSort(A, N){
      |      ^~~~~~~~~~~~~
main.c:19:6: error: type of 'N' defaults to 'int' [-Wimplicit-int]
main.c:22:5: error: 'j' undeclared (first use in this function)
   22 |     j = i-1;
      |     ^
main.c:22:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:5: error: 'v' undeclared (first use in this function)
   23 |     v = A[i];
      |     ^
main.c:23:10: error: subscripted value is neither array nor pointer nor vector
   23 |     v = A[i];
      |          ^
main.c:30:21: error: subscripted value is neither array nor pointer nor vector
   30 |       printf("%d", A[i]);
      |                     ^
Language: C

#include <stdio.h>
const int n = 100;
void insertionSort(A, N);


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

  insertionSort(A, N);

  return 0;
}

void insertionSort(A, N){
  int i, j;
  for(i = 1; i < N-1; i++){
    j = i-1;
    v = A[i];
    while(j >= 0 && A[j] > v){
      A[j+1] = A[j];
      j--;
    }
    A[j+1] = v;
    for(i = 0; i < N-1; i++){
      printf("%d", A[i]);
      if(i == N-1) printf("\n");
    }
  }
}



Compiler output:
main.c:3:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
    3 | void insertionSort(A, N);
      | ^~~~
main.c: In function 'insertionSort':
main.c:19:6: error: type of 'A' defaults to 'int' [-Wimplicit-int]
   19 | void insertionSort(A, N){
      |      ^~~~~~~~~~~~~
main.c:19:6: error: type of 'N' defaults to 'int' [-Wimplicit-int]
main.c:23:5: error: 'v' undeclared (first use in this function)
   23 |     v = A[i];
      |     ^
main.c:23:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:10: error: subscripted value is neither array nor pointer nor vector
   23 |     v = A[i];
      |          ^
main.c:24:22: error: subscripted value is neither array nor pointer nor vector
   24 |     while(j >= 0 && A[j] > v){
      |                      ^
main.c:25:8: error: subscripted value is neither array nor pointer nor vector
   25 |       A[j+1] = A[j];
      |        ^
main.c:25:17: error: subscripted value is neither array nor pointer nor vector
   25 |       A[j+1] = A[j];
      |                 ^
main.c:28:6: error: subscripted value is neither array nor pointer nor vector
   28 |     A[j+1] = v;
      |      ^
main.c:30:21: error: subscripted value is neither array nor pointer nor vector
   30 |       printf("%d", A[i]);
      |                     ^
Language: C

#include <stdio.h>
const int n = 100;
void insertionSort(A, N);


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

  insertionSort(A, N);

  return 0;
}

void insertionSort(A, N){
  int i, j, v;
  for(i = 1; i < N-1; i++){
    j = i-1;
    v = A[i];
    while(j >= 0 && A[j] > v){
      A[j+1] = A[j];
      j--;
    }
    A[j+1] = v;
    for(i = 0; i < N-1; i++){
      printf("%d", A[i]);
      if(i == N-1) printf("\n");
    }
  }
}



Compiler output:
main.c:3:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
    3 | void insertionSort(A, N);
      | ^~~~
main.c: In function 'insertionSort':
main.c:19:6: error: type of 'A' defaults to 'int' [-Wimplicit-int]
   19 | void insertionSort(A, N){
      |      ^~~~~~~~~~~~~
main.c:19:6: error: type of 'N' defaults to 'int' [-Wimplicit-int]
main.c:23:10: error: subscripted value is neither array nor pointer nor vector
   23 |     v = A[i];
      |          ^
main.c:24:22: error: subscripted value is neither array nor pointer nor vector
   24 |     while(j >= 0 && A[j] > v){
      |                      ^
main.c:25:8: error: subscripted value is neither array nor pointer nor vector
   25 |       A[j+1] = A[j];
      |        ^
main.c:25:17: error: subscripted value is neither array nor pointer nor vector
   25 |       A[j+1] = A[j];
      |                 ^
main.c:28:6: error: subscripted value is neither array nor pointer nor vector
   28 |     A[j+1] = v;
      |      ^
main.c:30:21: error: subscripted value is neither array nor pointer nor vector
   30 |       printf("%d", A[i]);
      |                     ^
Language: C

#include <stdio.h>
const int n = 100;
void insertionSort(int A[], int N);


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

  insertionSort(A, N);

  return 0;
}

void insertionSort(int A, int N){
  int i, j, v;
  for(i = 1; i < N-1; i++){
    j = i-1;
    v = A[i];
    while(j >= 0 && A[j] > v){
      A[j+1] = A[j];
      j--;
    }
    A[j+1] = v;
    for(i = 0; i < N-1; i++){
      printf("%d", A[i]);
      if(i == N-1) printf("\n");
    }
  }
}



Compiler output:
main.c:19:6: error: conflicting types for 'insertionSort'; have 'void(int,  int)'
   19 | void insertionSort(int A, int N){
      |      ^~~~~~~~~~~~~
main.c:3:6: note: previous declaration of 'insertionSort' with type 'void(int *, int)'
    3 | void insertionSort(int A[], int N);
      |      ^~~~~~~~~~~~~
main.c: In function 'insertionSort':
main.c:23:10: error: subscripted value is neither array nor pointer nor vector
   23 |     v = A[i];
      |          ^
main.c:24:22: error: subscripted value is neither array nor pointer nor vector
   24 |     while(j >= 0 && A[j] > v){
      |                      ^
main.c:25:8: error: subscripted value is neither array nor pointer nor vector
   25 |       A[j+1] = A[j];
      |        ^
main.c:25:17: error: subscripted value is neither array nor pointer nor vector
   25 |       A[j+1] = A[j];
      |                 ^
main.c:28:6: error: subscripted value is neither array nor pointer nor vector
   28 |     A[j+1] = v;
      |      ^
main.c:30:21: error: subscripted value is neither array nor pointer nor vector
   30 |       printf("%d", A[i]);
      |                     ^
Language: C

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

int main() {
    int N =0;
    int i,j;
    int sorted=0;
    int data[110];
    int temp;

    scanf("%d",&N);

    for(i = 0; i < N; i++){
        scanf("%d",&data[i]);
    }
    while(sorted < N-1) {

        for(i = 0;i < N-1; ++i){
            printf("%d ",data[i]);
        }
        printf("%d",data[N-1]);

        for (i = 0; i < sorted+1; ++i) {
            if (data[sorted + 1] < data[i]) {
                temp = data[sorted + 1];
                for (j = sorted; j >= i ; --j) {
                    data[j + 1] = data[j];
                }
                data[i] = temp;
                break;
            }
        }


        putchar('\n');
        sorted++;
    }

    for(i = 0;i < N-1; ++i){
        printf("%d ",data[i]);
    }
    printf(“%d\n",data[N-1]);


    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:42:12: error: stray '\342' in program
   42 |     printf(<U+201C>%d\n",data[N-1]);
      |            ^~~~~~~~
main.c:42:13: error: expected expression before '%' token
   42 |     printf(“%d\n",data[N-1]);
      |             ^
main.c:42:15: error: stray '\' in program
   42 |     printf(“%d\n",data[N-1]);
      |               ^
main.c:42:17: warning: missing terminating " character
   42 |     printf(“%d\n",data[N-1]);
      |                 ^
main.c:42:17: error: missing terminating " character
   42 |     printf(“%d\n",data[N-1]);
      |                 ^~~~~~~~~~~~~
main.c:45:14: error: expected ';' before '}' token
   45 |     return 0;
      |              ^
      |              ;
   46 | }
      | ~
Language: C

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

int main() {
    int N =0;
    int i,j;
    int sorted=0;
    int data[110];
    int temp;

    scanf("%d",&N);

    for(i = 0; i < N; i++){
        scanf("%d",&data[i]);
    }
    while(sorted < N-1) {

        for(i = 0;i < N-1; ++i){
            printf("%d ",data[i]);
        }
        printf("%d",data[N-1]);

        for (i = 0; i < sorted+1; ++i) {
            if (data[sorted + 1] < data[i]) {
                temp = data[sorted + 1];
                for (j = sorted; j >= i ; --j) {
                    data[j + 1] = data[j];
                }
                data[i] = temp;
                break;
            }
        }


        putchar('\n');
        sorted++;
    }

    for(i = 0;i < N-1; ++i){
        printf("%d ",data[i]);
    }
    printf(“%d",data[N-1]);


    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:42:12: error: stray '\342' in program
   42 |     printf(<U+201C>%d",data[N-1]);
      |            ^~~~~~~~
main.c:42:13: error: expected expression before '%' token
   42 |     printf(“%d",data[N-1]);
      |             ^
main.c:42:15: warning: missing terminating " character
   42 |     printf(“%d",data[N-1]);
      |               ^
main.c:42:15: error: missing terminating " character
   42 |     printf(“%d",data[N-1]);
      |               ^~~~~~~~~~~~~
main.c:45:14: error: expected ';' before '}' token
   45 |     return 0;
      |              ^
      |              ;
   46 | }
      | ~
Language: C

#include <stdio.h>

int main()
{
 int i, j, a;
 int temp;
 int r[100];

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

 for ( i = 1; i < a; ++i ) {
  j = i - 1;
  while ( ( r[j] < r[j-1] ) && ( j >= 0) ) {
   temp   = r[j];
   r[j]   = r[j-1];
   r[j-1] = r[j];
   j--;
  }

  for ( int k = 0; k < a-1; ++k ) {
   printf("%d ", r[k]);
  }
  printf("%d\n", r[a-1]);

 }

 
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:19: error: expected expression before ';' token
   10 |  for ( i = 0; i < ; ++i ) {
      |                   ^
Language: C

#include <stdio.h>

int main()
{
 int i, j, a;
 int temp;
 int r[100];

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

 for ( i = 1; i < a; ++i ) {
  j    = i - 1;
  temp = r[i]
  while ( ( r[j] > temp ) && ( j >= 0) ) {
   r[j+1] = r[j];
   j--;
  }

  r[j+1] = temp;

  for ( int k = 0; k < a-1; ++k ) {
   printf("%d ", r[k]);
  }
  printf("%d\n", r[a-1]);

 }

 
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:14: error: expected ';' before 'while'
   16 |   temp = r[i]
      |              ^
      |              ;
   17 |   while ( ( r[j] > temp ) && ( j >= 0) ) {
      |   ~~~~~
Language: C

#include <stdio.h>

int main(void){
   int N, i, j, v;

   scanf("%d", &N);

   int A[N];

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

   for(i = 1; i < N; i++) {
      v = A[i];
      j = i - 1;
   while (j >= 0&&A[j] > v){
      A[j + 1] = A[j];
      j--;
   }
   A[j + 1] = v;
   }

   for(i = 0; i < N; i++) {
      printf("%d\n", x);
      if (i < N){
         printf(" \n");
      }
   }

   return 0;
}


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

void printer(int a[],int n){
    int x;
    for(x=0,x<n,x++){
        printf("%d",a[x]);
        if(x != n-1)printf(" ");

    }
}

void insert(int a[],int n){
    int i;
    int j;
    int temp;

    for(i=0,i<n-1,i++){
        j=i+1
            while(a[j-1]>a[j]&&j>1){
             
             temp=a[j-1];
             a[j-1]=a[j];
             a[j]=temp;
             }
        printer(a[],n);
        printf("\n");
    }
}

void main(){
   int y;
   int z;
   int n;
   scanf("%d",&n);
   int a[n];
   for(z=0,z<n,z++){
       scanf("%d",a[z]);
   }
   printer(a,n);
   printf("\n");
   insert(a,n);

}


Compiler output:
main.c: In function 'printer':
main.c:3:20: error: expected ';' before ')' token
    3 |     for(x=0,x<n,x++){
      |                    ^
      |                    ;
main.c:3:20: error: expected expression before ')' token
main.c:4:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    4 |         printf("%d",a[x]);
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | void printer(int a[],int n){
main.c:4:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    4 |         printf("%d",a[x]);
      |         ^~~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'insert':
main.c:15:22: error: expected ';' before ')' token
   15 |     for(i=0,i<n-1,i++){
      |                      ^
      |                      ;
main.c:15:22: error: expected expression before ')' token
main.c:16:14: error: expected ';' before 'while'
   16 |         j=i+1
      |              ^
      |              ;
   17 |             while(a[j-1]>a[j]&&j>1){
      |             ~~~~~
main.c:24:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   24 |         printf("\n");
      |         ^~~~~~
main.c:24:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'main':
main.c:32:4: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   32 |    scanf("%d",&n);
      |    ^~~~~
main.c:32:4: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:32:4: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
main.c:32:4: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:34:19: error: expected ';' before ')' token
   34 |    for(z=0,z<n,z++){
      |                   ^
      |                   ;
main.c:34:19: error: expected expression before ')' token
main.c:38:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   38 |    printf("\n");
      |    ^~~~~~
main.c:38:4: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<studio.h>
void printer(int a[],int n){
    int x;
    for(x=0,x<n,x++){
        printf("%d",a[x]);
        if(x != n-1)printf(" ");

    }
}

void insert(int a[],int n){
    int i;
    int j;
    int temp;

    for(i=0,i<n-1,i++){
        j=i+1
            while(a[j-1]>a[j]&&j>1){
             
             temp=a[j-1];
             a[j-1]=a[j];
             a[j]=temp;
             }
        printer(a[],n);
        printf("\n");
    }
}

void main(){
   int y;
   int z;
   int n;
   scanf("%d",&n);
   int a[n];
   for(z=0,z<n,z++){
       scanf("%d",a[z]);
   }
   printer(a,n);
   printf("\n");
   insert(a,n);

}


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

#include<stdio.h>
void printer(int a[],int n){
    int x;
    for(x=0,x<n,x++){
        printf("%d",a[x]);
        if(x != n-1)printf(" ");

    }
}

void insert(int a[],int n){
    int i;
    int j;
    int temp;

    for(i=0,i<n-1,i++){
        j=i+1
            while(a[j-1]>a[j]&&j>1){
             
             temp=a[j-1];
             a[j-1]=a[j];
             a[j]=temp;
             }
        printer(a[],n);
        printf("\n");
    }
}

void main(){
   int y;
   int z;
   int n;
   scanf("%d",&n);
   int a[n];
   for(z=0,z<n,z++){
       scanf("%d",a[z]);
   }
   printer(a,n);
   printf("\n");
   insert(a,n);

}


Compiler output:
main.c: In function 'printer':
main.c:4:20: error: expected ';' before ')' token
    4 |     for(x=0,x<n,x++){
      |                    ^
      |                    ;
main.c:4:20: error: expected expression before ')' token
main.c: In function 'insert':
main.c:16:22: error: expected ';' before ')' token
   16 |     for(i=0,i<n-1,i++){
      |                      ^
      |                      ;
main.c:16:22: error: expected expression before ')' token
main.c:17:14: error: expected ';' before 'while'
   17 |         j=i+1
      |              ^
      |              ;
   18 |             while(a[j-1]>a[j]&&j>1){
      |             ~~~~~
main.c: In function 'main':
main.c:35:19: error: expected ';' before ')' token
   35 |    for(z=0,z<n,z++){
      |                   ^
      |                   ;
main.c:35:19: error: expected expression before ')' token
Language: C

#include<stdio.h>
void printer(int a[],int n){
    int x;
    for(x=0;x<n;x++){
        printf("%d",a[x]);
        if(x != n-1)printf(" ",);

    }
}

void insert(int a[],int n){
    int i;
    int j;
    int temp;

    for(i=0;i<n-1;i++){
        j=i+1
            while(a[j-1]>a[j]&&j>1){
             
             temp=a[j-1];
             a[j-1]=a[j];
             a[j]=temp;
             }
        printer(a[],n);
        printf("\n");
    }
}

void main(){
   int y;
   int z;
   int n;
   scanf("%d",&n);
   int a[n];
   for(z=0,z<n,z++){
       scanf("%d",a[z]);
   }
   printer(a,n);
   printf("\n");
   insert(a,n);

}


Compiler output:
main.c: In function 'printer':
main.c:6:32: error: expected expression before ')' token
    6 |         if(x != n-1)printf(" ",);
      |                                ^
main.c: In function 'insert':
main.c:17:14: error: expected ';' before 'while'
   17 |         j=i+1
      |              ^
      |              ;
   18 |             while(a[j-1]>a[j]&&j>1){
      |             ~~~~~
main.c: In function 'main':
main.c:35:19: error: expected ';' before ')' token
   35 |    for(z=0,z<n,z++){
      |                   ^
      |                   ;
main.c:35:19: error: expected expression before ')' token
Language: C

#include<stdio.h>
void printer(int a[],int n){
    int x;
    for(x=0;x<n;x++){
        printf("%d",a[x]);
        if(x != n-1)printf(" ");

    }
}

void insert(int a[],int n){
    int i;
    int j;
    int temp;

    for(i=0;i<n-1;i++){
        j=i+1;
            while(a[j-1]>a[j]&&j>1){
             
             temp=a[j-1];
             a[j-1]=a[j];
             a[j]=temp;
             }
        printer(a,n);
        if(i !=n-2)(printf("\n");
    }
}

int main(){
   int y;
   int z;
   int n;
   scanf("%d",&n);
   int a[n];
   for(z=0;z<n;z++){
       scanf("%d",&a[z]);
   }
   printer(a,n);
   printf("\n");
   insert(a,n);
   return 0;
}


Compiler output:
main.c: In function 'insert':
main.c:25:33: error: expected ')' before ';' token
   25 |         if(i !=n-2)(printf("\n");
      |                    ~            ^
      |                                 )
main.c:25:34: error: expected ';' before '}' token
   25 |         if(i !=n-2)(printf("\n");
      |                                  ^
      |                                  ;
   26 |     }
      |     ~
Language: C

#include<stdio.h>
void printer(int a[],int n){
    int x;
    for(x=0;x<n;x++){
        printf("%d",a[x]);
        if(x != n-1)printf(" ");

    }
}

void insert(int a[],int n){
    int i;
    int j;
    int temp;
    int fi=(n-2);
    for(i=0;i<n-1;i++){
        j=i+1;
            while(a[j-1]>a[j]&&j>1){
             
             temp=a[j-1];
             a[j-1]=a[j];
             a[j]=temp;
             j--
             }
        printer(a,n);
        
        if(i !=fi)printf("\n");
    }
}

int main(){
   int y;
   int z;
   int n;
   scanf("%d",&n);
   int a[n];
   for(z=0;z<n;z++){
       scanf("%d",&a[z]);
   }
   printer(a,n);
   printf("\n");
   insert(a,n);
   return 0;
}


Compiler output:
main.c: In function 'insert':
main.c:23:17: error: expected ';' before '}' token
   23 |              j--
      |                 ^
      |                 ;
   24 |              }
      |              ~
Language: C

#include<stdio.h>

void insertionSort(int a[1000], int N);

int main(void){
    int a[1000],N,i,j;
    scanf("%d\n",&N);
    
    for(i=0;i<N;i++){
        scanf("%d ",&a[i]);
    }

    insertionSort(a,N);

}

void insertionSort(int a[1000], int N){
    int i,j,v;

    for(i=1;i<N:i++){
        v=a[i];
        j=i-1;
        while(j>=0 && a[j]>v){
            a[j+1]=a[j]
            j--;
        }
        a[j+1]=v;
    }    

}


Compiler output:
main.c: In function 'insertionSort':
main.c:20:16: error: expected ';' before ':' token
   20 |     for(i=1;i<N:i++){
      |                ^
      |                ;
main.c:24:24: error: expected ';' before 'j'
   24 |             a[j+1]=a[j]
      |                        ^
      |                        ;
   25 |             j--;
      |             ~
Language: C

#include<stdio.h>

void insertionSort(int a[1000], int N);

int main(void){
    int a[1000],N,i,j;
    scanf("%d\n",&N);
    
    for(i=0;i<N;i++){
        scanf("%d ",&a[i]);
    }

    insertionSort(a,N);

}

void insertionSort(int a[1000], int N){
    int i,j,v;

    for(i=1;i<N;i++){
        v=a[i];
        j=i-1;
        while(j>=0 && a[j]>v){
            a[j+1]=a[j]
            j--;
        }
        a[j+1]=v;
    }    

}


Compiler output:
main.c: In function 'insertionSort':
main.c:24:24: error: expected ';' before 'j'
   24 |             a[j+1]=a[j]
      |                        ^
      |                        ;
   25 |             j--;
      |             ~