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

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

public class Main1{
	public static void main(String[] args)throws NumberFormatException,IOException{

		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		
		String buf = br.readLine();
		int n = Integer.parseInt(buf);
			

		String[] arr = new String[n]; /*arr???????????????????????¨*/
		String[] arr1 = new String[n]; /*arr1????????¬????????§??????????????¨*/

		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader ar = new BufferedReader(is);

		String str = ar.readLine(); /*str????????????????????????????????????????????¨*/
		arr = str.split(" "); 
		arr1 = str.split(" ");
	
		
		/*??????????????????*/
		for(int i=0;i<n;i++){
			boolean bln = true;
			while(bln){
				bln = false;
			for(int j=n-1;1<=j;j--){
				if(arr[j].charAt(0)<arr[j-1].charAt(0)){
					 String temp = arr[j-1];
					arr[j-1] = arr[j];
					arr[j] = temp;
					bln = true;
				}
			}
			}
		}
			for(int i=0;i<n;i++){
			    System.out.print(arr[i]+" ");
			    }
			}
		}
	

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.BufferedReader;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.BufferedReader;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.IOException;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.IOException;
      |            ^
main.c:3:1: error: unknown type name 'import'
    3 | import java.io.InputStreamReader;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.io.InputStreamReader;
      |            ^
main.c:5:1: error: unknown type name 'public'
    5 | public class Main1{
      | ^~~~~~
main.c:5:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main1'
    5 | public class Main1{
      |              ^~~~~
Language: C

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

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

		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		
		String buf = br.readLine();
		int n = Integer.parseInt(buf);
			

		String[] arr = new String[n]; /*arr???????????????????????¨*/
		String[] arr1 = new String[n]; /*arr1????????¬????????§??????????????¨*/

		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader ar = new BufferedReader(is);

		String str = ar.readLine(); /*str????????????????????????????????????????????¨*/
		arr = str.split(" "); 
		arr1 = str.split(" ");
	
		
		/*??????????????????*/
		for(int i=0;i<n;i++){
			boolean bln = true;
			while(bln){
				bln = false;
			for(int j=n-1;1<=j;j--){
				if(arr[j].charAt(0)<arr[j-1].charAt(0)){
					 String temp = arr[j-1];
					arr[j-1] = arr[j];
					arr[j] = temp;
					bln = true;
				}
			}
			}
		}
			for(int i=0;i<n;i++){
			    System.out.print(arr[i]+" ");
			    }
			}
		}
	

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.BufferedReader;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.BufferedReader;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.IOException;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.IOException;
      |            ^
main.c:3:1: error: unknown type name 'import'
    3 | import java.io.InputStreamReader;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.io.InputStreamReader;
      |            ^
main.c:5:1: error: unknown type name 'public'
    5 | public class Main{
      | ^~~~~~
main.c:5:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    5 | public class Main{
      |              ^~~~
Language: C

#include<stdio.h>
#include<math.h>

int bubbleSort(A, n)
{
	int c, flag = 1, j; // ????????£??\????´?????????¨??????
	while(flag){
		flag = 0;
		for(j = n-1; j > 0; j--){ 
		if(A[j] < A[j-1]){
		 	m = A[j];
		 	A[j] = A[j-1];
		 	A[j-1]=m;
			flag = 1;
			A[n+1]++;
			}
		}
	}
	c = A[n+1];
	return c;
}

int main (void)
{
	int n, A[100]={0}, i;
	
	scanf("%d", &n);
	
	for(i=0; i<n; i++){
		scanf("%d", &A[i]);
	}
	
	c = bubbleSort(A[100],n);
	
	for(i=0; i<n+1; i++){
		printf("%d", A[i]);
		if(i != n) printf(" ");
		if(i == n) printf("\n");
	}
	
	printf("%d\n", &c);
	
  return 0;
}

Compiler output:
main.c: In function 'bubbleSort':
main.c:4:5: error: type of 'A' defaults to 'int' [-Wimplicit-int]
    4 | int bubbleSort(A, n)
      |     ^~~~~~~~~~
main.c:4:5: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:10:21: error: subscripted value is neither array nor pointer nor vector
   10 |                 if(A[j] < A[j-1]){
      |                     ^
main.c:10:28: error: subscripted value is neither array nor pointer nor vector
   10 |                 if(A[j] < A[j-1]){
      |                            ^
main.c:11:25: error: 'm' undeclared (first use in this function)
   11 |                         m = A[j];
      |                         ^
main.c:11:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:30: error: subscripted value is neither array nor pointer nor vector
   11 |                         m = A[j];
      |                              ^
main.c:12:26: error: subscripted value is neither array nor pointer nor vector
   12 |                         A[j] = A[j-1];
      |                          ^
main.c:12:33: error: subscripted value is neither array nor pointer nor vector
   12 |                         A[j] = A[j-1];
      |                                 ^
main.c:13:26: error: subscripted value is neither array nor pointer nor vector
   13 |                         A[j-1]=m;
      |                          ^
main.c:15:26: error: subscripted value is neither array nor pointer nor vector
   15 |                         A[n+1]++;
      |                          ^
main.c:19:14: error: subscripted value is neither array nor pointer nor vector
   19 |         c = A[n+1];
      |              ^
main.c: In function 'main':
main.c:33:9: error: 'c' undeclared (first use in this function)
   33 |         c = bubbleSort(A[100],n);
      |         ^
Language: C

#include<stdio.h>
#include<math.h>

int bubbleSort(A, n)
{
	int c, flag = 1, j, m; // ????????£??\????´?????????¨??????
	while(flag){
		flag = 0;
		for(j = n-1; j > 0; j--){ 
		if(A[j] < A[j-1]){
		 	m = A[j];
		 	A[j] = A[j-1];
		 	A[j-1]=m;
			flag = 1;
			A[n+1]++;
			}
		}
	}
	c = A[n+1];
	return c;
}

int main (void)
{
	int n, A[100]={0}, i, c;
	
	scanf("%d", &n);
	
	for(i=0; i<n; i++){
		scanf("%d", &A[i]);
	}
	
	c = bubbleSort(A[100],n);
	
	for(i=0; i<n; i++){
		printf("%d", A[i]);
		if(i != n) printf(" ");
		if(i == n) printf("\n");
	}
	
	printf("%d\n", &c);
	
  return 0;
}

Compiler output:
main.c: In function 'bubbleSort':
main.c:4:5: error: type of 'A' defaults to 'int' [-Wimplicit-int]
    4 | int bubbleSort(A, n)
      |     ^~~~~~~~~~
main.c:4:5: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:10:21: error: subscripted value is neither array nor pointer nor vector
   10 |                 if(A[j] < A[j-1]){
      |                     ^
main.c:10:28: error: subscripted value is neither array nor pointer nor vector
   10 |                 if(A[j] < A[j-1]){
      |                            ^
main.c:11:30: error: subscripted value is neither array nor pointer nor vector
   11 |                         m = A[j];
      |                              ^
main.c:12:26: error: subscripted value is neither array nor pointer nor vector
   12 |                         A[j] = A[j-1];
      |                          ^
main.c:12:33: error: subscripted value is neither array nor pointer nor vector
   12 |                         A[j] = A[j-1];
      |                                 ^
main.c:13:26: error: subscripted value is neither array nor pointer nor vector
   13 |                         A[j-1]=m;
      |                          ^
main.c:15:26: error: subscripted value is neither array nor pointer nor vector
   15 |                         A[n+1]++;
      |                          ^
main.c:19:14: error: subscripted value is neither array nor pointer nor vector
   19 |         c = A[n+1];
      |              ^
Language: C

#include<stdio.h>
#include<math.h>

int bubbleSort(A, n)
{
	int c, flag = 1, j, m, A[100]; // ????????£??\????´?????????¨??????
	while(flag){
		flag = 0;
		for(j = n-1; j > 0; j--){ 
		if(A[j] < A[j-1]){
		 	m = A[j];
		 	A[j] = A[j-1];
		 	A[j-1]=m;
			flag = 1;
			A[n+1]++;
			}
		}
	}
	c = A[n+1];
	return c;
}

int main (void)
{
	int n, A[100]={0}, i, c;
	
	scanf("%d", &n);
	
	for(i=0; i<n; i++){
		scanf("%d", &A[i]);
	}
	
	c = bubbleSort(A[100],n);
	
	for(i=0; i<n; i++){
		printf("%d", A[i]);
		if(i != n) printf(" ");
		if(i == n) printf("\n");
	}
	
	printf("%d\n", &c);
	
  return 0;
}

Compiler output:
main.c: In function 'bubbleSort':
main.c:4:5: error: type of 'A' defaults to 'int' [-Wimplicit-int]
    4 | int bubbleSort(A, n)
      |     ^~~~~~~~~~
main.c:4:5: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:6:32: error: 'A' redeclared as different kind of symbol
    6 |         int c, flag = 1, j, m, A[100]; // ????????£??\????´?????????¨??????
      |                                ^
main.c:4:5: note: previous definition of 'A' with type 'int'
    4 | int bubbleSort(A, n)
      |     ^~~~~~~~~~
Language: C

#include<stdio.h>
int bsort(int a[],int n){
	int i,j,num=0;
	for(i=0;i<n-1;i++){
		for(j=0;j<n-i-1;j++){
			if(a[j+1]>a[j]){
				int temp=a[j];
				a[j]=a[j+1];
				a[j+1]=temp;
				num++;
			}
		}
	}
	return num;
}
int main(void){
	int i,n,num,x[100];
	sacnf("%d",&n);
	for(i=0;i<n;i++){scanf("%d",&x[i]);}
	num=bsort(x,n);
	for (i=0;i<n;i++){printf("%d ",x[i]);}
	printf("\b \b\n%d\n",num);
	return 0;
}

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

#include<stdio.h>
int bsort(int a[],int n){
	int i,j,num=0;
	for(i=0;i<n-1;i++){
		for(j=0;j<n-i-1;j++){
			if(a[j+1]>a[j]){
				int temp=a[j];
				a[j]=a[j+1];
				a[j+1]=temp;
				num++;
			}
		}
	}
	return num;
}
int main(void){
	int i,n,num,x[100];
	sacnf("%d",&n);
	for(i=0;i<n;i++){scanf("%d",&x[i]);}
	num=bsort(x,n);
        printf("%d",x[0]);
	for (i=1;i<n;i++){printf(" %d",x[i]);}
	printf("\n%d\n",num);
	return 0;
}

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

#include <stdio.h>
#define N 100
int main(void)
{
    int n;
    int i, j;
    int temp;
    int a[N];
    int flag=0;
    scanf("%d", &n);
for(i = 0; i < n; i++)
scanf("%d",&a[i]);

    //start

 while(number){
        for (j = n-1; j > i; j--){
            if (a[j] < a[j-1]){
                temp = a[j];
                a[j] = a[j - 1];
                a[j - 1] = temp;
                flag=1;
            }
            
        }
    }

    for (i = 0; i < n; i++)
        printf("%d ", a[i]);
        putchar('\n');
        
    printf("%d", number);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:8: error: 'number' undeclared (first use in this function)
   16 |  while(number){
      |        ^~~~~~
main.c:16:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#define N 100
int main(void)
{
    int n;
    int i, j;
    int temp;
    int a[N];
    int flag=0;
    scanf("%d", &n);
for(i = 0; i < n; i++)
scanf("%d",&a[i]);

    //start

 while(flag){
        for (j = n-1; j > i; j--){
            if (a[j] < a[j-1]){
                temp = a[j];
                a[j] = a[j - 1];
                a[j - 1] = temp;
                flag=1;
            }
            
        }
    }

    for (i = 0; i < n; i++)
        printf("%d ", a[i]);
        putchar('\n');
        
    printf("%d", number);
    return 0;
}

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

#include <stdio.h>
#define N 100
int main(void)
{
    int n;
    int i, j;
    int temp;
    int a[N];
    int flag=1;
    scanf("%d", &n);
for(i = 0; i < n; i++)
scanf("%d",&a[i]);

    //start

 while(flag){
         flag=0;
        for (j = n-1; j > i; j--){
            if (a[j] < a[j-1]){
                temp = a[j];
                a[j] = a[j - 1];
                a[j - 1] = temp;
                flag=1;
            }
            
        }
    }

    for (i = 0; i < n; i++)
        printf("%d ", a[i]);
        putchar('\n');
        
    printf("%d", number);
    return 0;
}

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

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


int main()
{
	
	int i=0,p=0,t=0,flag=0,count=0;
	
	scanf("%d", &p);
	int *bubblesort = (int*)malloc(sizeof(int)*p);

	for (i = 0; i < p; i++)
	{
		scanf("%d", &bubblesort[i]);
	}
	
	
	flag = 1;
	
	while(flag)
	{
		flag = 0;
		for(i=p-1;i>0;i--)
		{
			if(bubblesort[i] < bubblesort[i-1])
			{
				 t = bubblesort[i];
				 bubblesort[i] = bubblesort[i-1];
				 bubblesort[i-1] = t;
				 count++;
				 flag = 1;
			}
		}
	}
	
	
	for(i=0;i<p;i++)
	{
		if(i=0)
		printf("%d"bubblesort[i]);
		else
		printf("%2d",bubblesort[i]);
	}
	printf("\n");
	printf("%d\n",count);
	
	return 0;
	
	
}

Compiler output:
main.c: In function 'main':
main.c:41:28: error: expected ')' before 'bubblesort'
   41 |                 printf("%d"bubblesort[i]);
      |                       ~    ^~~~~~~~~~
      |                            )
Language: C

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


int main()
{
	
	int i=0,p=0,t=0,flag=0,count=0.y;
	
	scanf("%d", &p);
	int *bubblesort = (int*)malloc(sizeof(int)*p);

	for (i = 0; i < p; i++)
	{
		scanf("%d", &bubblesort[i]);
	}
	 y=p;
	
	flag = 1;
	
	while(flag)
	{
		flag = 0;
		for(i=p-1;i>0;i--)
		{
			if(bubblesort[i] < bubblesort[i-1])
			{
				//printf("wwwwwwwwww");
				 t = bubblesort[i];
				 bubblesort[i] = bubblesort[i-1];
				 bubblesort[i-1] = t;
				 count++;
				 flag = 1;
			}
			//printf("w");
		}
	}
	
	
	for(i=0;i<y;i++)
	{
		if(i=0)
		printf("%d"bubblesort[i]);
		
		else
		printf("%2d",bubblesort[i]);
	}
	
	printf("\n");
	printf("%d\n",count);
	
	return 0;
	
	
}

Compiler output:
main.c: In function 'main':
main.c:8:38: error: invalid suffix "y" on floating constant
    8 |         int i=0,p=0,t=0,flag=0,count=0.y;
      |                                      ^~~
main.c:17:10: error: 'y' undeclared (first use in this function)
   17 |          y=p;
      |          ^
main.c:17:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:43:28: error: expected ')' before 'bubblesort'
   43 |                 printf("%d"bubblesort[i]);
      |                       ~    ^~~~~~~~~~
      |                            )
Language: C

#include<stdio.h>
int main(void){
	int flag=1,n,i,c;
	int a[100];
	scanf("%d",&n);//n?????\???
	for(i=0;i<n;i=i+1){
		scanf("%d"&a[i]);//a?????\???
	}//?????????????§?,a??????????°????????????¨???????????????????????????????????\????????????????????????????????¢??????????????\?????????????????????
	
	
	
	
	
	
	printf("%d\n",a);
	printf("%d\n",c);//???????????¨???

Compiler output:
main.c: In function 'main':
main.c:7:27: error: invalid operands to binary & (have 'char *' and 'int')
    7 |                 scanf("%d"&a[i]);//a?????\???
      |                       ~~~~^~~~~
      |                       |     |
      |                       |     int
      |                       char *
main.c:16:9: error: expected declaration or statement at end of input
   16 |         printf("%d\n",c);//???????????¨???
      |         ^~~~~~
Language: C

#include<stdio.h>

int bubblesort(int n,int A[]){
	int i,j;
	int N=0;
	int a;
	for(i=0;i<n;i++){
		for(j=n-1;j>i;j--){
			if(A[j-1]>A[j]){
				a=A[j-1];
				A[j-1]=A[j];
				A[j]=a;
				N++;
			}
		}
	}
	for(i=0;i<n-1;i++){
		printf("%d ",A[i]);
	}
	printf("%d\n",A[i]);
	return N;
}
int main(){
	int i,n,A[100];
	scanf("%d",&n);
	for (i = 0; i < n; i++) {
		scanf("%d", &A[i]);
	}
	printf("%d",bubblesort(n));

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:29:21: error: too few arguments to function 'bubblesort'
   29 |         printf("%d",bubblesort(n));
      |                     ^~~~~~~~~~
main.c:3:5: note: declared here
    3 | int bubblesort(int n,int A[]){
      |     ^~~~~~~~~~
Language: C

#include <math.h>

int isPrime(int a[]);
int n;

int main(){
        int i;
	scanf("%d", &n);

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

	isPrime(x);

	for (i = 0; i < n; i++){
		if (i != 0){ printf(" "); }
		printf("%d", x[i]);
	}

	return 0;
}

int isPrime(int a[]){
	int i;
	int min;
	int j;
	int g;
	int max;
	int p = 0;
	//????°????????????????
	for (i = 0; i < n; i++){
		min = a[i];
		for (g = n-1; g > i; g--){
			if (min > a[g]){
				j = a[g - 1];
				a[g - 1] = a[g];
				a[g] = j;
				min = a[g];
			}
		}
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |         scanf("%d", &n);
      |         ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | #include <math.h>
  +++ |+#include <stdio.h>
    2 | 
main.c:8:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |         scanf("%d", &n);
      |         ^~~~~
main.c:8:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:11:30: error: 'x' undeclared (first use in this function)
   11 |                 scanf("%d", &x[i]);
      |                              ^
main.c:11:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:30: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   17 |                 if (i != 0){ printf(" "); }
      |                              ^~~~~~
main.c:17:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:17:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   18 |                 printf("%d", x[i]);
      |                 ^~~~~~
main.c:18:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <math.h>

int isPrime(int a[]);
int n;
int count;
int main(){
	int a[10000], i, count =0,x[200000];

	scanf("%d", &n);

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

	isPrime(x);

	for (i = 0; i < n; i++){
		if (i != 0){ printf(" "); }
		printf("%d", x[i]);
	}

	printf("\n");
	printf("%d", isPrime(x));

	return 0;
}

int isPrime(int a[]){
	int i;
	int min;
	int j;
	int g;
	int max;
	int p = 0;
	count = 0;
	//????°????????????????
	for (i = 0; i < n; i++){
		min = a[n-1];
		for (g = n-1; g > i; g--){
			if (a[g] < a[g-1]){
				j = a[g - 1];
				a[g - 1] = a[g];
				a[g] = j;
				count++;
			}
		}
	}

	return count;

Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |         scanf("%d", &n);
      |         ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | #include <math.h>
  +++ |+#include <stdio.h>
    2 | 
main.c:9:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |         scanf("%d", &n);
      |         ^~~~~
main.c:9:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:30: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |                 if (i != 0){ printf(" "); }
      |                              ^~~~~~
main.c:18:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   19 |                 printf("%d", x[i]);
      |                 ^~~~~~
main.c:19:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |         printf("\n");
      |         ^~~~~~
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'isPrime':
main.c:49:9: error: expected declaration or statement at end of input
   49 |         return count;
      |         ^~~~~~
Language: C

#include <math.h>

int isPrime(int a[]);
int n;
int count;
int main(){
	int a[10000], i, count =0,x[200000];

	scanf("%d", &n);

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

	isPrime(x);

	for (i = 0; i < n; i++){
		if (i != 0){ printf(" "); }
		printf("%d", x[i]);
	}

	printf("\n");
	printf("%d\n", isPrime(x));

	return 0;
}

int isPrime(int a[]){
	int i;
	int min;
	int j;
	int g;
	int max;
	int p = 0;
	count = 0;
	//????°????????????????
	for (i = 0; i < n; i++){
		min = a[n-1];
		for (g = n-1; g > i; g--){
			if (a[g] < a[g-1]){
				j = a[g - 1];
				a[g - 1] = a[g];
				a[g] = j;
				count++;
			}
		}
	}

	return count;

Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |         scanf("%d", &n);
      |         ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | #include <math.h>
  +++ |+#include <stdio.h>
    2 | 
main.c:9:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |         scanf("%d", &n);
      |         ^~~~~
main.c:9:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:30: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |                 if (i != 0){ printf(" "); }
      |                              ^~~~~~
main.c:18:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   19 |                 printf("%d", x[i]);
      |                 ^~~~~~
main.c:19:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |         printf("\n");
      |         ^~~~~~
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'isPrime':
main.c:49:9: error: expected declaration or statement at end of input
   49 |         return count;
      |         ^~~~~~
Language: C

#include <math.h>

int isPrime(int a[]);
int n,p;
int count = 0;
int main(){
	int a[10000], i, count =0,x[200000];

	scanf_s("%d", &n);

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

	p = isPrime(x);

	for (i = 0; i < n; i++){
		if (i != 0){ printf(" "); }
		printf("%d ", x[i]);
	}

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

	return 0;
}

int isPrime(int a[]){
	int i;
	int min;
	int j;
	int g;
	int max;
	int p = 0;

	//????°????????????????
	for (i = 0; i < n; i++){
		min = a[n-1];
		for (g = n-1; g > i; g--){
			if (a[g] < a[g-1]){
				j = a[g - 1];
				a[g - 1] = a[g];
				a[g] = j;
				count++;
			}
		}
	}

	return count;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf_s' [-Wimplicit-function-declaration]
    9 |         scanf_s("%d", &n);
      |         ^~~~~~~
main.c:18:30: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |                 if (i != 0){ printf(" "); }
      |                              ^~~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'printf'
    1 | #include <math.h>
  +++ |+#include <stdio.h>
    2 | 
main.c:18:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   18 |                 if (i != 0){ printf(" "); }
      |                              ^~~~~~
main.c:18:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   19 |                 printf("%d ", x[i]);
      |                 ^~~~~~
main.c:19:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |         printf("\n");
      |         ^~~~~~
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
#include <math.h>

int isPrime(int a[]);
int n,p;
int count = 0;
int main(){
	int a[10000], i, count =0,x[200000];

	scanf("%d", &n);

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

	p = isPrime(x);

	for (i = 0; i < n; i++){
		if (i != 0){ printf(" "); }
		printf("%d", x[i]);
	}

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

	return 0;
}

int isPrime(int a[]){
	int i;
	int min;
	int j;
	int g;
	int max;
	int p = 0;

	for (i = 0; i < n; i++){
		for (g = n-1; g > i; g--){
			if (a[g] < a[g-1]){
				j = a[g - 1];
				a[g - 1] = a[g];
				a[g] = j;
				count++;
			}
		}
	}

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

#include<stdio.h>
#include <math.h>

int isPrime(int a[]);
int n,p;
int count = 0;
int main(){
	int a[10000], i, count =0,x[200000];

	scanf("%d", &n);

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

	p = isPrime(x);

	for (i = 0; i < n; i++){
		if (i != 0){ printf(" "); }
		printf("%d", x[i]);
	}

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

	return 0;
}

int isPrime(int a){
	int i;
	int min;
	int j;
	int g;
	int max;
	int p = 0;

	for (i = 0; i < n; i++){
		for (g = n-1; g > i; g--){
			if (a[g] < a[g-1]){
				j = a[g - 1];
				a[g - 1] = a[g];
				a[g] = j;
				count++;
			}
		}
	}

Compiler output:
main.c:29:5: error: conflicting types for 'isPrime'; have 'int(int)'
   29 | int isPrime(int a){
      |     ^~~~~~~
main.c:4:5: note: previous declaration of 'isPrime' with type 'int(int *)'
    4 | int isPrime(int a[]);
      |     ^~~~~~~
main.c: In function 'isPrime':
main.c:39:30: error: subscripted value is neither array nor pointer nor vector
   39 |                         if (a[g] < a[g-1]){
      |                              ^
main.c:39:37: error: subscripted value is neither array nor pointer nor vector
   39 |                         if (a[g] < a[g-1]){
      |                                     ^
main.c:40:38: error: subscripted value is neither array nor pointer nor vector
   40 |                                 j = a[g - 1];
      |                                      ^
main.c:41:34: error: subscripted value is neither array nor pointer nor vector
   41 |                                 a[g - 1] = a[g];
      |                                  ^
main.c:41:45: error: subscripted value is neither array nor pointer nor vector
   41 |                                 a[g - 1] = a[g];
      |                                             ^
main.c:42:34: error: subscripted value is neither array nor pointer nor vector
   42 |                                 a[g] = j;
      |                                  ^
main.c:46:9: error: expected declaration or statement at end of input
   46 |         }
      |         ^
Language: C

#include<stdio.h>
#include <math.h>

int isPrime(int a);
int n,p;
int count = 0;
int main(){
	int a[10000], i, count =0,x[200000];

	scanf("%d", &n);

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

	p = isPrime(x);

	for (i = 0; i < n; i++){
		if (i != 0){ printf(" "); }
		printf("%d", x[i]);
	}

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

	return 0;
}

int isPrime(int a){
	int i;
	int min;
	int j;
	int g;
	int max;
	int p = 0;

	for (i = 0; i < n; i++){
		for (g = n-1; g > i; g--){
			if (a[g] < a[g-1]){
				j = a[g - 1];
				a[g - 1] = a[g];
				a[g] = j;
				count++;
			}
		}
	}

Compiler output:
main.c: In function 'main':
main.c:16:21: error: passing argument 1 of 'isPrime' makes integer from pointer without a cast [-Wint-conversion]
   16 |         p = isPrime(x);
      |                     ^
      |                     |
      |                     int *
main.c:4:17: note: expected 'int' but argument is of type 'int *'
    4 | int isPrime(int a);
      |             ~~~~^
main.c: In function 'isPrime':
main.c:39:30: error: subscripted value is neither array nor pointer nor vector
   39 |                         if (a[g] < a[g-1]){
      |                              ^
main.c:39:37: error: subscripted value is neither array nor pointer nor vector
   39 |                         if (a[g] < a[g-1]){
      |                                     ^
main.c:40:38: error: subscripted value is neither array nor pointer nor vector
   40 |                                 j = a[g - 1];
      |                                      ^
main.c:41:34: error: subscripted value is neither array nor pointer nor vector
   41 |                                 a[g - 1] = a[g];
      |                                  ^
main.c:41:45: error: subscripted value is neither array nor pointer nor vector
   41 |                                 a[g - 1] = a[g];
      |                                             ^
main.c:42:34: error: subscripted value is neither array nor pointer nor vector
   42 |                                 a[g] = j;
      |                                  ^
main.c:46:9: error: expected declaration or statement at end of input
   46 |         }
      |         ^
Language: C

#include<stdio.h>
#include <math.h>

int isPrime(int *a);
int n,p;
int count = 0;
int main(){
	int a[10000], i, count =0,x[200000];

	scanf("%d", &n);

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

	p = isPrime(x);

	for (i = 0; i < n; i++){
		if (i != 0){ printf(" "); }
		printf("%d", x[i]);
	}

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

	return 0;
}

int isPrime(int *a){
	int i;
	int min;
	int j;
	int g;
	int max;
	int p = 0;

	for (i = 0; i < n; i++){
		for (g = n-1; g > i; g--){
			if (a[g] < a[g-1]){
				j = a[g - 1];
				a[g - 1] = a[g];
				a[g] = j;
				count++;
			}
		}
	}

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

#include<stdio.h>
#include <math.h>

int isPrime(int *a);
int n,p;
int count = 0;
int main(){
	int a[10000], i, count =0,x[200000];

	scanf("%d", &n);

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

	p = isPrime(x);

	for (i = 0; i < n; i++){
		if (i != 0){ printf(" "); }
		printf("%d", x[i]);
	}

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

	return 0;
}

int isPrime(int a[]){
	int i;
	int min;
	int j;
	int g;
	int max;
	int p = 0;

	for (i = 0; i < n; i++){
		for (g = n-1; g > i; g--){
			if (a[g] < a[g-1]){
				j = a[g - 1];
				a[g - 1] = a[g];
				a[g] = j;
				count++;
			}
		}
	}

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

#include<stdio.h>

/*??°?????????*/
void swap(int& x, int& y) {
	int temp = x;
	x = y;
	y = temp;
}

int main(void) {
	int N, a[100], i, j, k=0;
	/*printf("??´??°?????\????????????????????????");*/
	scanf("%d", &N);
	/*printf("%d??????????´??????\????????????????????????",N);*/
	for (i = 0; i < N; i++)
		scanf("%d", &a[i]);
	for (i = 0; i < N; i++) {
		for (j = N - 1; j > i; j--) {
			if (a[j] < a[j - 1]) {
				swap(a[j], a[j - 1]);
				k++;
			}
		}
	}
	for (i = 0; i < N; i++)
		printf("%d%s", a[i], i < N-1 ? " " : "\n");
	printf("%d\n", k);
	return 0;
}

Compiler output:
main.c:4:14: error: expected ';', ',' or ')' before '&' token
    4 | void swap(int& x, int& y) {
      |              ^
main.c: In function 'main':
main.c:20:33: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   20 |                                 swap(a[j], a[j - 1]);
      |                                 ^~~~
Language: C

#include<stdio.h>

int main() {
  int N[100], A[100];
  int n, i, j, temp, flag=1, cout=0;

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

  while (flag) {
    flag=0;
    for (j=n-1; j>0; j--) {
      if (A[j]<A[j-1]) {
        temp=A[j];
        A[j]=A[j-1];
        A[j-1]=temp;
        flag=1;
        cout++;
      }
    }
  }
  for (i=0; i<n; i++)
    printf("%d ",A[i]);
 
  printf("\n");
  printf
  return 0;

}

Compiler output:
main.c: In function 'main':
main.c:28:9: error: expected ';' before 'return'
   28 |   printf
      |         ^
      |         ;
   29 |   return 0;
      |   ~~~~~~
Language: C

#include <stdio.h>

int main() {
	int a[100] = { 0 };
	int number;
	int count;
	int i, j;
	int temp;

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

	count = 0;
	for (i = 0; i < number; i++) {
		for (j = number - 1; j > i; j--) {

    		if (a[j] < a[j - 1]) {
	    		temp = a[j];
		    	a[j] = a[j - 1];
		    	a[j - 1] = temp;
				count++;
		    }
		}
	}

	for (i = 0; i < number - 1; i++) {
		printf_s("%d ", a[i]);
	}
	printf_s("%d", a[number - 1]);
	printf_s("\n%d\n", count);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   10 |         scanf_s("%d", &number);
      |         ^~~~~~~
      |         scanf
main.c:29:17: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration]
   29 |                 printf_s("%d ", a[i]);
      |                 ^~~~~~~~
      |                 printf
Language: C

#include<stdio.h>

int main()
{

    int i, j, k, l, n, m, w;
    int a[100];

    scanf("%d", n);

    for (m = 0; m <= n - 1; m++)
    {
    scanf("%d", a[m]);
    }


    for (k = 0; k <= n - 1; k++)
    {
      for (i = 0; i <= n - 2 -k; i++)
      {
        if (a[i] > a[i + 1]
        {
         w        = a[i];
         a[i]     = a[i + 1];
         a[i + 1] = w;
         j++;
        }
      }
    }


    for (l = 0; l <= n; l++)
    {
      printf("%d ", a[l]);
    }

    putchar("\n");

    printf("%d\n", j)

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:28: error: expected ')' before '{' token
   21 |         if (a[i] > a[i + 1]
      |            ~               ^
      |                            )
   22 |         {
      |         ~                   
main.c:28:7: error: expected expression before '}' token
   28 |       }
      |       ^
main.c:37:13: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   37 |     putchar("\n");
      |             ^~~~
      |             |
      |             char *
In file included from main.c:1:
/usr/include/stdio.h:618:25: note: expected 'int' but argument is of type 'char *'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
main.c:39:22: error: expected ';' before 'return'
   39 |     printf("%d\n", j)
      |                      ^
      |                      ;
   40 | 
   41 | return 0;
      | ~~~~~~
Language: C

#include<stdio.h>

int main()
{

    int i, j, k, l, n, m, w;
    int a[100];

    scanf("%d", n);

    for (m = 0; m <= n - 1; m++)
    {
    scanf("%d", a[m]);
    }


    for (k = 0; k <= n - 1; k++)
    {
      for (i = 0; i <= n - 2 -k; i++)
      {
        if (a[i] > a[i + 1]
        {
         w        = a[i];
         a[i]     = a[i + 1];
         a[i + 1] = w;
         j++;
        }
      }
    }


    for (l = 0; l <= n; l++)
    {
      printf("%d ", a[l]);
    }

    putchar("\n");

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:28: error: expected ')' before '{' token
   21 |         if (a[i] > a[i + 1]
      |            ~               ^
      |                            )
   22 |         {
      |         ~                   
main.c:28:7: error: expected expression before '}' token
   28 |       }
      |       ^
main.c:37:13: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   37 |     putchar("\n");
      |             ^~~~
      |             |
      |             char *
In file included from main.c:1:
/usr/include/stdio.h:618:25: note: expected 'int' but argument is of type 'char *'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
Language: C

#include<stdio.h>

int main()
{

    int i = 0, j, k, n, m;
    int a[100];

    scanf("%d", &n);

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

    while (i < n)
    {
      for (j = n - 1; j >= i + 1; j--)
      {
        if (a[j] > a[j - 1])
        {
         w        = a[j];
         a[j]     = a[j + 1];
         a[j + 1] = w;
         m++;
         }
       }
     i++;
    }
    

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

    printf("\n");

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:10: error: 'w' undeclared (first use in this function)
   22 |          w        = a[j];
      |          ^
main.c:22:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main()
{

    int i = 0;
    int j, k, n, m;
    int a[100];

    scanf("%d", &n);

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

    while (i < n)
    {
      for (j = n - 1; j >= i + 1; j--)
      {
        if (a[j] > a[j - 1])
        {
         w        = a[j];
         a[j]     = a[j + 1];
         a[j + 1] = w;
         m++;
         }
       }
     i++;
    }
    

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

    printf("\n");

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:10: error: 'w' undeclared (first use in this function)
   23 |          w        = a[j];
      |          ^
main.c:23:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
 int N, minj;
 int A[];
 int i, j, temp, flag;
 int c=0;
 int n, k=0;

 scanf("%d\n", &N);
 while(N>=0){
    scanf("%d\n, &A[n])
      n++;
 }
    flag =1;
    while(flag){
      flag=0;
      for(j=N-1;j>0;j++){
         if(A[j] < A[j-1]){
             temp = A[j];
             A[j] = A[j-1];
             A[j-1] = temp;
             flag = 1;
              c++;
         }
       }

    }

 printf("%d \n", A[])
 
  printf("%d \n", c);
 
 return 0;

}

Compiler output:
main.c: In function 'main':
main.c:5:6: error: array size missing in 'A'
    5 |  int A[];
      |      ^
main.c:12:11: warning: missing terminating " character
   12 |     scanf("%d\n, &A[n])
      |           ^
main.c:12:11: error: missing terminating " character
   12 |     scanf("%d\n, &A[n])
      |           ^~~~~~~~~~~~~
main.c:13:10: error: expected ')' before ';' token
   13 |       n++;
      |          ^
      |          )
main.c:12:10: note: to match this '('
   12 |     scanf("%d\n, &A[n])
      |          ^
main.c:13:8: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
   13 |       n++;
      |       ~^~
      |        |
      |        int
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'int'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:13:11: error: expected ';' before '}' token
   13 |       n++;
      |           ^
      |           ;
   14 |  }
      |  ~         
main.c:30:20: error: expected expression before ']' token
   30 |  printf("%d \n", A[])
      |                    ^
Language: C

#include <stdio.h>

int main(){
 int n,i,j,temp;
 int x[n];
 int flag = 1;
 int c = 0;

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

  while(flag){
   flag = 0
   for(j = n-1;j >= 1;j--){
    if(x[j] < x[j-1]){
     temp = x[j];
     x[j] = x[j-1];
     x[j-1] = temp;
     flag = 1;
     c = c + 1;
    }
   }
  }
 for(i = 0;i < n;i++){
  printf("%d ",x[i]);
 }
 printf("\n%d\n",c);

 return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:15:12: error: expected ';' before 'for'
   15 |    flag = 0
      |            ^
      |            ;
   16 |    for(j = n-1;j >= 1;j--){
      |    ~~~
Language: C

#include <stdio.h>
int main(void) {
	int fiag = 1, i, j, n, v, a[100];
	scanf("%d", &n); /*1 <= n <= 100*/
	for (i = 0; i < n; i++)
		scanf("%d", &a[i]);
	for (j = 0; j < n - 1; j++)
		printf("%d ", a[j]);
	printf("%d\n", a[n - 1]);
	while (flag) {
		flag = 0;
		for (j = n - 1; j > 0; j++) {
			if (a[j] < a[j - 1]) {
				v = a[j];
				a[j] = a[j - 1];
				a[j - 1] = v;
				flag = 1;
			}
		}
		for (j = 0; j < n - 1; j++)
			printf("%d ", a[j]);
		printf("%d\n", a[n - 1]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:16: error: 'flag' undeclared (first use in this function); did you mean 'fiag'?
   10 |         while (flag) {
      |                ^~~~
      |                fiag
main.c:10:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(int argc, const char * argv[]) {
    int N = 100;
    int a[N];
    int n, i, j, k, cnt;
    scanf("%d", &n);
    for(i = 0;i < n;i++){
        scanf("%d", &a[i]);
    }
    cnt = bubbleSort(a, n);
    for(i = 0;i < n;i++){
        printf("%d", a[i]);
        if(i < n-1){
            printf(" ");
        }
    }
    printf("\n");
    ptintf("%d\n", cnt);
    return 0;
}

int bubbleSort(*a, n){
    int flag = 1, j, v, cnt = 0;
    while(flag){
        flag = 0;
        for(j = n - 1;j > 0;j--){
            if(a[j] < a[j-1]){
                v = a[j];
                a[j] = a[j-1];
                a[j-1] = v;
                flag = 1;
                cnt++;
            }
        }
    }
    return cnt;
}

Compiler output:
main.c: In function 'main':
main.c:11:11: error: implicit declaration of function 'bubbleSort' [-Wimplicit-function-declaration]
   11 |     cnt = bubbleSort(a, n);
      |           ^~~~~~~~~~
main.c:19:5: error: implicit declaration of function 'ptintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   19 |     ptintf("%d\n", cnt);
      |     ^~~~~~
      |     printf
main.c: At top level:
main.c:23:16: error: expected declaration specifiers or '...' before '*' token
   23 | int bubbleSort(*a, n){
      |                ^
main.c:23:20: error: unknown type name 'n'
   23 | int bubbleSort(*a, n){
      |                    ^
Language: C

#include <stdio.h>
int main(void) {
	int flag = 1, i, j, n, v, changes = 0, a[100];
	scanf("%d", &n); /*1 <= n <= 100*/
	for (i = 0; i < n; i++)
		scanf("%d", &a[i]);
	while (flag) {
		flag = 0;
		for (j = n - 1; j > 0; j++) {
			if (a[j] < a[j - 1]) {
				v = a[j];
				a[j] = a[j - 1];
				a[j - 1] = v;
				flag = 1;
				changes++;
			}
		}
	}
	for (j = 0; j < n - 1; j++)
		printf("%d ", a[j]);
	printf("%d\n", a[n - 1]);
	rintf("%d\n", changes);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:9: error: implicit declaration of function 'rintf' [-Wimplicit-function-declaration]
   22 |         rintf("%d\n", changes);
      |         ^~~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'rintf'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | int main(void) {
main.c:22:9: warning: incompatible implicit declaration of built-in function 'rintf' [-Wbuiltin-declaration-mismatch]
   22 |         rintf("%d\n", changes);
      |         ^~~~~
main.c:22:9: note: include '<math.h>' or provide a declaration of 'rintf'
main.c:22:15: error: incompatible type for argument 1 of 'rintf'
   22 |         rintf("%d\n", changes);
      |               ^~~~~~
      |               |
      |               char *
main.c:22:15: note: expected 'float' but argument is of type 'char *'
main.c:22:9: error: too many arguments to function 'rintf'
   22 |         rintf("%d\n", changes);
      |         ^~~~~
Language: C

#include <stdio.h>

int bubbleSort(*a, n){
    int flag = 1, j, v, cnt = 0;
    while(flag){
        flag = 0;
        for(j = n - 1;j > 0;j--){
            if(a[j] < a[j-1]){
                v = a[j];
                a[j] = a[j-1];
                a[j-1] = v;
                flag = 1;
                cnt++;
            }
        }
    }
    return cnt;
}


int main(int argc, const char * argv[]) {
    int N = 100;
    int a[N];
    int n, i, cnt;
    scanf("%d", &n);
    for(i = 0;i < n;i++){
        scanf("%d", &a[i]);
    }
    cnt = bubbleSort(a, n);
    for(i = 0;i < n;i++){
        printf("%d", a[i]);
        if(i < n-1){
            printf(" ");
        }
    }
    printf("\n");
    printf("%d\n", cnt);
    return 0;
}

Compiler output:
main.c:3:16: error: expected declaration specifiers or '...' before '*' token
    3 | int bubbleSort(*a, n){
      |                ^
main.c:3:20: error: unknown type name 'n'
    3 | int bubbleSort(*a, n){
      |                    ^
main.c: In function 'main':
main.c:29:11: error: implicit declaration of function 'bubbleSort' [-Wimplicit-function-declaration]
   29 |     cnt = bubbleSort(a, n);
      |           ^~~~~~~~~~
Language: C

#include <stdio.h>

int main(void){
   int N,n,i,j,k,v;
   int count = 0;
   int A[100];
   scanf("%d",&N);
	
   for(i=0;i<N;i++){
      scanf("%d",&n);
      A[i] = n;
   }
	int flag = 1;
	while(flag==1){
		flag = 0;
		for(j=N-1;j>1;j--){
			if(A[j]<A[j-1]){
				int a = A[j];
				A[j] = A[j-1];
				A[j-1] = a;
				flag = 1;
			}
		}
		count++:
	}

	for(k=0;k<N-1;k++){
		printf("%d ",A[k]);
	}
	printf("%d\n",A[k]);
	printf("%d\n",count);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:24: error: expected ';' before ':' token
   24 |                 count++:
      |                        ^
      |                        ;
Language: C

#include <stdio.h>

int main() {
  int i, temp;
  int N, A[100];
  int flag = 1, t = 0;

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

  while (flag) {
    flag = 0;
    for (i = N-1 ; i >= 1 ; i--) {
      if (A[i] < A[j-1]) {
        temp = A[j];
        A[j] = A[j-1];
        A[j-1] = temp;
        flag = 1;
        t++;
      }
    }
  }

  for (i = 0 ; i < N ; i++) {
    if (i > 0)
      putchar (' ');
    printf ("%d", A[i]);
  }

  putchar ('\n');

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:20: error: 'j' undeclared (first use in this function)
   18 |       if (A[i] < A[j-1]) {
      |                    ^
main.c:18:20: note: each undeclared identifier is reported only once for each function it appears in