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

#include<stdio.h>

int main () {

   int n, i, j, k, v;
   int a[100] = {0};

   scanf("%d",&n);

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

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

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

      a[j+1] = v;

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

   return 0;

}


   

Compiler output:
main.c: In function 'main':
main.c:14:13: error: expected ';' before 'i'
   14 |    for(i = 1 i < n; i++){
      |             ^~
      |             ;
main.c:14:24: error: expected ';' before ')' token
   14 |    for(i = 1 i < n; i++){
      |                        ^
      |                        ;
Language: C

#include<stdio.h>

int main(){

  int n;
  int A[100], v, i, j;

  scanf ("%d", &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++ ){
      if ( i > 0 ) printf(" ");
      printf("%d", A[i]);
    }
    printf("\n");

  return 0;
}

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

#include <stdio.h>

void trace(int a[],int N){
  int k;
  for(k=0;k<N;k++){
      if(k>0){
         printf(" ");
      }
    printf("%d",a[k]);
    }
  printf("\n");
}

void insertionsort(int [],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;
    trace(a,N);
  }
}

int main(void)
{
  int N,i,a[100];

  scanf("%d",&N);

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

    
  

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

void insertionSort(int A[], int N)
{
  int i,j;

  for (i = 1; i <N; i++)
{
 int v = A[i];
 j = i-1;

  whle((j > 0) && (A[j] > v))
{
   A[j+1] = A[j];
   swap(&A[j+1],&A[j]);
   j--;
    }
  }
}

Compiler output:
main.c: In function 'insertionSort':
main.c:10:3: error: implicit declaration of function 'whle' [-Wimplicit-function-declaration]
   10 |   whle((j > 0) && (A[j] > v))
      |   ^~~~
main.c:10:30: error: expected ';' before '{' token
   10 |   whle((j > 0) && (A[j] > v))
      |                              ^
      |                              ;
   11 | {
      | ~
Language: C

#include <stdio.h>

void trace(int a[],int N){
  int k;
  for(k=0;k<N;k++){
      if(k>0){
         printf(" ");
      }
    printf("%d",a[k]);
    }
  printf("\n");
}

void insertionsort(int [],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;
    trace(a,N);
  }
}

int main(void)
{
  int N,i,j,a[100];

  scanf("%d",&N);

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

    
  

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

#include <stdio.h>
int main(){

int n,i,k;

scanf("%d",&n);

int a[n];

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

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

Compiler output:
main.c: In function 'main':
main.c:11:18: error: expected ';' before '}' token
   11 | scanf("%d",&a[i])
      |                  ^
      |                  ;
   12 | }
      | ~                 
main.c:22:3: error: expected expression before ';' token
   22 | j-;
      |   ^
Language: C

#include <stdio.h>
int main(){

int n,i,k;

scanf("%d",&n);

int a[n];

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

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

int temp,j; 

temp=a[i];

j=i-1;

while(j>=0&&a[j]>temp){

a[j+1]=a[j];

j-;
}
j++;
a[j]=temp;
for(k=0;k<n;k++){
if(k>0)
printf(" ");
printf("%d",a[k]);
}
printf("\n");
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:18: error: expected ';' before '}' token
   11 | scanf("%d",&a[i])
      |                  ^
      |                  ;
   12 | }
      | ~                 
main.c:31:3: error: expected expression before ';' token
   31 | j-;
      |   ^
Language: C

#include <stdio.h>

int main(void)
{
	int n,i,k,l,m[1000];
	
	 scanf("%d",&n);
	 for(i=0;i<n;i++){
	 scanf("%d",&m[i]);
	printf("%d", insertionSort(m[i],n));
	 }
	return 0;
}
int insertionSort(int A, int N)
{
2   for(i=1;i<N;i++)
   {
3     v = A[i];
4     j = i - 1;
5     while (j >= 0 && A[j] > v){
6       A[j+1] = A[j];
7       j--;
8     A[j+1] = v;
}
}

Compiler output:
main.c: In function 'main':
main.c:10:22: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   10 |         printf("%d", insertionSort(m[i],n));
      |                      ^~~~~~~~~~~~~
main.c: In function 'insertionSort':
main.c:16:2: error: expected ';' before 'for'
   16 | 2   for(i=1;i<N;i++)
      |  ^  ~~~
      |  ;
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
	int n,i,k,l,m[1000];
	
	 scanf("%d",&n);
	 for(i=0;i<n;i++){
	 scanf("%d",&m[i]);
	printf("%d", insertionSort(m[i],n));
	 }
	return 0;
}
int insertionSort(int A, int N)
{
   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 'main':
main.c:10:22: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   10 |         printf("%d", insertionSort(m[i],n));
      |                      ^~~~~~~~~~~~~
main.c: In function 'insertionSort':
main.c:16:8: error: 'i' undeclared (first use in this function)
   16 |    for(i=1;i<N;i++)
      |        ^
main.c:16:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:5: error: 'v' undeclared (first use in this function)
   18 |     v = A[i];
      |     ^
main.c:19:5: error: 'j' undeclared (first use in this function)
   19 |     j = i - 1;
      |     ^
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
	int n,i,k,l,m[1000];
	
	 scanf("%d",&n);
	 for(i=0;i<n;i++){
	 scanf("%d",&m[i]);
	printf("%d\n", insertionSort(m[i],n));
	 }
	return 0;
}
int insertionSort(int *A, 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 'main':
main.c:10:24: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   10 |         printf("%d\n", insertionSort(m[i],n));
      |                        ^~~~~~~~~~~~~
main.c: In function 'insertionSort':
main.c:19:10: error: invalid type argument of unary '*' (have 'int')
   19 |      v = *A[i];
      |          ^~~~~
main.c:21:22: error: invalid type argument of unary '*' (have 'int')
   21 |     while (j >= 0 && *A[j] > v){
      |                      ^~~~~
main.c:22:7: error: invalid type argument of unary '*' (have 'int')
   22 |       *A[j+1] = *A[j];
      |       ^~~~~~~
main.c:22:17: error: invalid type argument of unary '*' (have 'int')
   22 |       *A[j+1] = *A[j];
      |                 ^~~~~
main.c:24:4: error: invalid type argument of unary '*' (have 'int')
   24 |    *A[j+1] = v;
      |    ^~~~~~~
Language: C

#include <stdio.h>

void trace(int x[], int n){
	
	int i;
	
	for ( i = 0; i < n; i++ ){
		if ( i > 0 ){
			putchar(' ');
			putchar('%d', x[i]);
		}
	}
	putchar('\n');
}


void insertionSort(int x[], int n){
	int j, i, v;
	for ( i = 1; i < n; i++){
		v = x[i];
		j = i - 1;
		while ( j >= 0 && x[j] > v ){
			x[j + 1] = x[j];
			j--;
		}
		x[j + 1] = v;
		trace(x, n);
	}
}

int main(void){
	int n, i, j, x[1000];
	
	scanf("%d", &n);
	for ( i = 0; i < n; i++ ){
		scanf("%d", &x[i]);
	}
		trace(x, n);
		insertionSort(x, n);
		
		return 0;
}

Compiler output:
main.c: In function 'trace':
main.c:10:33: warning: multi-character character constant [-Wmultichar]
   10 |                         putchar('%d', x[i]);
      |                                 ^~~~
main.c:10:25: error: too many arguments to function 'putchar'
   10 |                         putchar('%d', x[i]);
      |                         ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:618:12: note: declared here
  618 | extern int putchar (int __c);
      |            ^~~~~~~
Language: C

#include<stdio.h>
int main(void)

{
  int i,j,k,A[100],N,v;
  scanf("%d", &N);
  
  for (i = 0; i <N; i++)
{
  v = A[i];
  j = i-1;

  whle((j > 0) && (A[j] > v))
{
   A[j+1] = A[j];
   j--;
   A[j + 1] = v;
}
}
  for(k = 0; k < n; k++)
{
  printf("%d",A[k]);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'whle' [-Wimplicit-function-declaration]
   13 |   whle((j > 0) && (A[j] > v))
      |   ^~~~
main.c:13:30: error: expected ';' before '{' token
   13 |   whle((j > 0) && (A[j] > v))
      |                              ^
      |                              ;
   14 | {
      | ~                             
main.c:20:18: error: 'n' undeclared (first use in this function)
   20 |   for(k = 0; k < n; k++)
      |                  ^
main.c:20:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
int i,v,j;
int a[100];
scanf("%d",&n);

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

for(i=0;i<n;++i){
for(j=i+1;j<n;++j){
v=a[i];
a[i]=a[j];
a[j]=v;
}
}
}

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


#include<stdio.h>

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


int main(void)
{
    int N,i,j;
    int A[100];

     
    scanf("%d",&N);

  for(i=0;i<N;i++){
if(i>=1){
printf("  ");
printf("%d",A[i]);
}
else{
printf("  \n");
}
  for(i=0;i<N;i++){
scanf("%d",A[i])
}
        }
    insertionSort(A,N);
        return 0;
}

Compiler output:
main.c: In function 'insertionSort':
main.c:5:8: error: 'i' undeclared (first use in this function)
    5 |    for(i= 1; i<N-1;i++){
      |        ^
main.c:5:8: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:33:17: error: expected ';' before '}' token
   33 | scanf("%d",A[i])
      |                 ^
      |                 ;
   34 | }
      | ~                
main.c: In function 'insertionSort':
main.c:38:1: error: expected declaration or statement at end of input
   38 | }
      | ^
Language: C

#include <stdio.h>
int main(){
int n,i,v,j;
int a[100];
scanf("%d",&n);

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

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

Compiler output:
main.c:19:1: error: expected identifier or '(' before 'for'
   19 | for(i=0;i<n;+;i){
      | ^~~
main.c:19:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   19 | for(i=0;i<n;+;i){
      |          ^
main.c:19:13: error: expected identifier or '(' before '+' token
   19 | for(i=0;i<n;+;i){
      |             ^
main.c:19:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before ')' token
   19 | for(i=0;i<n;+;i){
      |                ^
main.c:23:1: error: expected identifier or '(' before 'return'
   23 | return 0;
      | ^~~~~~
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^
Language: C

#include <stdio.h>
int main(){
int n,i,v,j;
int a[100];
scanf("%d",&n);

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

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

}
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:14: error: expected expression before ';' token
   16 | for(i=0;i<n;+;i){
      |              ^
main.c: At top level:
main.c:24:1: error: expected identifier or '(' before 'return'
   24 | return 0;
      | ^~~~~~
main.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^
Language: C

#include<stdio.h>
int main(void)

{
  int i,j,k,A[100],N,v;
  scanf("%d", &N);
  
  for (i = 0; i <N; i++)
{
  v = A[i];
  j = i-1;

  whle((j > 0) && (A[j] > v))
{
   A[j+1] = A[j];
   j--;
   A[j + 1] = v;
 }
}
  for(k = 0; k < n; k++)
{
  printf("%d",A[k]);
  printf(" ");
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'whle' [-Wimplicit-function-declaration]
   13 |   whle((j > 0) && (A[j] > v))
      |   ^~~~
main.c:13:30: error: expected ';' before '{' token
   13 |   whle((j > 0) && (A[j] > v))
      |                              ^
      |                              ;
   14 | {
      | ~                             
main.c:20:18: error: 'n' undeclared (first use in this function)
   20 |   for(k = 0; k < n; k++)
      |                  ^
main.c:20:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
int n,i,v,j;
int a[100];
scanf("%d",&n);

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

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

}
}
}
return 0;
}

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

#include <stdio.h>
int main(){
int n,i,v,j;
int a[100];
scanf("%d",&n);

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

for(i=0;i<n;++i){
for(j=i+1;j<n;++j){
if(a[i]>a[j]){
v=a[i];
a[i]=a[j];
a[j]=v;

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

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

#include <stdio.h>

int main(void)
{
	int n,i,m[1000];
	
	 scanf("%d",&n);
	 for(i=0;i<n;i++){
	 scanf("%d",&m[i]);
	 
	 trace(m,n);
    insertionSort(m,n);
	

	return 0;
}
int insertionSort(int A[], 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;
   trace(A[],N);
}

}
}
int trace(int A[],int N){
	int i;
	for(i=0;i<N;i++){
		if(i>0)printf(" ");
		printf("%d",A[i]);
	}
	printf("\n");
}

Compiler output:
main.c: In function 'main':
main.c:11:10: error: implicit declaration of function 'trace' [-Wimplicit-function-declaration]
   11 |          trace(m,n);
      |          ^~~~~
main.c:12:5: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   12 |     insertionSort(m,n);
      |     ^~~~~~~~~~~~~
main.c: In function 'insertionSort':
main.c:28:12: error: expected expression before ']' token
   28 |    trace(A[],N);
      |            ^
Language: C

#include <stdio.h>

int main(void)
{
	int n,i,m[1000];
	
	 scanf("%d",&n);
	 for(i=0;i<n;i++){
	 scanf("%d",&m[i]);
	 
	 trace(m,n);
    insertionSort(m,n);
	

	return 0;
}
int insertionSort(int A[], 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;
   trace(A[j],N);
}

}
}
int trace(int A[],int N){
	int i;
	for(i=0;i<N;i++){
		if(i>0)printf(" ");
		printf("%d",A[i]);
	}
	printf("\n");
}

Compiler output:
main.c: In function 'main':
main.c:11:10: error: implicit declaration of function 'trace' [-Wimplicit-function-declaration]
   11 |          trace(m,n);
      |          ^~~~~
main.c:12:5: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   12 |     insertionSort(m,n);
      |     ^~~~~~~~~~~~~
Language: C

#include<stdio.h>

int main()
{
  int data[99], n, i, j, A, M;
  
  scanf("%d", &n);
  
  for(i = 0; i < n; i++){
    scanf("%d", &data[i]);
  }
  
  for (j = 0; j < n; j++){
      printf("%d ", data[j]);
  }
  
  
  for(i = 1; i < n; i++){
    if (data[i] < data[i-1]){
      M = data[i];
      for(j = 0; j < i; j++){
        if(M < data[j]){
          A = data[j];
          data[j] = M;
          M = A;
        }
        data[i] = M;
        
      }
    }
    printf("\n");
    printf("%d", data[0]);
    for (j = 1; j < n; j++){
      printf(" %d", data[j]);
    }
  }
}
}

Compiler output:
main.c:38:1: error: expected identifier or '(' before '}' token
   38 | }
      | ^
Language: C

#include<stdio.h>
int main(void)

{
  int i,j,k,A[100],N,v;
  scanf("%d", &N);
  
  for (i = 0; i <N; i++)
{
  v = A[i];
  j = i-1;

  whle((j > 0) && (A[j] > v))
{
   A[j+1] = A[j];
   j--;
   A[j + 1] = v;
 }
}
  for(k = 0; k < n; k++)
{
  printf("%d",A[k]);
}
puts(" ");
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'whle' [-Wimplicit-function-declaration]
   13 |   whle((j > 0) && (A[j] > v))
      |   ^~~~
main.c:13:30: error: expected ';' before '{' token
   13 |   whle((j > 0) && (A[j] > v))
      |                              ^
      |                              ;
   14 | {
      | ~                             
main.c:20:18: error: 'n' undeclared (first use in this function)
   20 |   for(k = 0; k < n; k++)
      |                  ^
main.c:20:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

void trace(int x[], int n){
	
	int i;
	
	for ( i = 0; i < n; i++ ){
		if ( i >= 0 ){
			printf(" ");
			printf("%d", x[i]);
		}
	}
	putchar('\n');
}


void insertionSort(int x[], int n){
	int j, i, v;
	for ( i = 1; i < n; i++){
		v = x[i];
		j = i - 1;
		while ( j >= 0 && x[j] > v ){
			x[j + 1] = x[j];
			j--;
		}
		x[j + 1] = v;
		trace(x, n);
	}
}

int main(void){
	int n, i, j, x[1000];
	
	scanf("%d", &n);
	for ( i = 0; i < n; i++ ){
		scanf("%d", &x[i]);
	}
		trace(x, n);
		insertionSort(x, n);
		
		return 0;

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

#include<stdio.h>
int main(void)

{
  int i,j,k,A[100],N,v;
  scanf("%d", &N);
  
  for (i = 0; i <N; i++)
{
  v = A[i];
  j = i-1;

  whle((j > 0) && (A[j] > v))
{
   A[j+1] = A[j];
   j--;
   A[j + 1] = v;
   printf("%d",A[k]);
}
}

puts(" ");
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'whle' [-Wimplicit-function-declaration]
   13 |   whle((j > 0) && (A[j] > v))
      |   ^~~~
main.c:13:30: error: expected ';' before '{' token
   13 |   whle((j > 0) && (A[j] > v))
      |                              ^
      |                              ;
   14 | {
      | ~
Language: C

#include<stdio.h>
int main(void)

{
  int i,j,k,A[100],N,v;
  scanf("%d", &N);
  
  for (i = 0; i <N; i++)
{
  v = A[i];
  j = i-1;

  whle((j > 0) && (A[j] > v))
{
   A[j+1] = A[j];
   j--;
   A[j + 1] = v;
   printf("%d",A[k]);
}
}


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'whle' [-Wimplicit-function-declaration]
   13 |   whle((j > 0) && (A[j] > v))
      |   ^~~~
main.c:13:30: error: expected ';' before '{' token
   13 |   whle((j > 0) && (A[j] > v))
      |                              ^
      |                              ;
   14 | {
      | ~
Language: C


#include <stdio.h>

int main(void)
{
	int n,i,m[1000];
	
	 scanf("%d",&n);
	 for(i=0;i<n;i++){
	 scanf("%d",&m[i]);
	 
	 trace(m,n);
    insertionSort(m,n);
	
	return 0;
}
void insertionSort(int A[], 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;
   trace(A,N);
}
}
int trace(int A[],int N){
	int i;
	for(i=0;i<N;i++){
		if(i>0)putchar(' ');
		printf("%d",A[i]);
	}
	printf("\n");
}

Compiler output:
main.c: In function 'main':
main.c:12:10: error: implicit declaration of function 'trace' [-Wimplicit-function-declaration]
   12 |          trace(m,n);
      |          ^~~~~
main.c:13:5: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   13 |     insertionSort(m,n);
      |     ^~~~~~~~~~~~~
main.c:38:1: error: expected declaration or statement at end of input
   38 | }
      | ^
Language: C


#include <stdio.h>

int main(void)
{
	int n,i,m[1000];
	
	 scanf("%d",&n);
	 for(i=0;i<n;i++){
	 scanf("%d",&m[i]);
	 
	 trace(m,n);
    insertionSort(m,n);
	
	return 0;
}
void insertionSort(int A[], 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;
   trace(A,N);
}
}
int trace(int A[],int N){
	int i;
	for(i=0;i<N;i++){
		if(i>0)putchar(' ');
		printf("%d",A[i]);
	}
	printf("\n");
}
}

Compiler output:
main.c: In function 'main':
main.c:12:10: error: implicit declaration of function 'trace' [-Wimplicit-function-declaration]
   12 |          trace(m,n);
      |          ^~~~~
main.c:13:5: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   13 |     insertionSort(m,n);
      |     ^~~~~~~~~~~~~
Language: C


#include<stdio.h>

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

}
int main(void){
    int N,i,j;
    int A[100];

     
    scanf("%d",&N);

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

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

    insertionSort(A,N);
        return 0;
}

Compiler output:
main.c: In function 'insertionSort':
main.c:5:8: error: 'i' undeclared (first use in this function)
    5 |    for(i= 1; i<N;i++){
      |        ^
main.c:5:8: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:32:17: error: expected ';' before '}' token
   32 | scanf("%d",A[i])
      |                 ^
      |                 ;
   33 | }
      | ~
Language: C


#include <stdio.h>

int main(void)
{
	int n,i,m[1000];
	
	 scanf("%d",&n);
	 for(i=0;i<n;i++){
	 scanf("%d",&m[i]);
	 
	 trace(m,n);
    insertionSort(m,n);
	
	return 0;
}
int insertionSort(int A[], 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;
   trace(A,N);
}
}
void trace(int A[],int N){
	int i;
	for(i=0;i<N;i++){
		if(i>0)putchar(' ');
		printf("%d",A[i]);
	}
	printf("\n");
}
}

Compiler output:
main.c: In function 'main':
main.c:12:10: error: implicit declaration of function 'trace' [-Wimplicit-function-declaration]
   12 |          trace(m,n);
      |          ^~~~~
main.c:13:5: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   13 |     insertionSort(m,n);
      |     ^~~~~~~~~~~~~
Language: C


#include <stdio.h>

int main(void)
{
	int n,i,m[1000];
	
	 scanf("%d",&n);
	 for(i=0;i<n;i++){
	 scanf("%d",&m[i]);
	 }
	 trace(m,n);
    insertionSort(m,n);
	
	return 0;
}
int insertionSort(int A[], 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;
   trace(A,N);
}
}
void trace(int A[],int N){
	int i;
	for(i=0;i<N;i++){
		if(i>0)putchar(' ');
		printf("%d",A[i]);
	}
	printf("\n");
}
}

Compiler output:
main.c: In function 'main':
main.c:12:10: error: implicit declaration of function 'trace' [-Wimplicit-function-declaration]
   12 |          trace(m,n);
      |          ^~~~~
main.c:13:5: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   13 |     insertionSort(m,n);
      |     ^~~~~~~~~~~~~
main.c: At top level:
main.c:31:6: warning: conflicting types for 'trace'; have 'void(int *, int)'
   31 | void trace(int A[],int N){
      |      ^~~~~
main.c:12:10: note: previous implicit declaration of 'trace' with type 'void(int *, int)'
   12 |          trace(m,n);
      |          ^~~~~
main.c:39:1: error: expected identifier or '(' before '}' token
   39 | }
      | ^
Language: C

#include <stdio.h>
int main(){
int n,i,v,j;
int a[100];
scanf("%d",&n);

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

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

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

}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:4: error: invalid operands to binary - (have 'int' and 'int *')
   19 | j=i-a;
      |    ^
      |    |
      |    int *
main.c: At top level:
main.c:33:1: error: expected identifier or '(' before 'return'
   33 | return 0;
      | ^~~~~~
main.c:34:1: error: expected identifier or '(' before '}' token
   34 | }
      | ^
Language: C

#include<stdio.h>
int main(void)

{
  int i,j,A[100],N,v;
  scanf("%d", &N);
  
  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;
   printf("%d",A[k]);
}
}
puts(" ");

return 0;
}

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

#include<stdio.h>
int main(void)

{
  int i,j,A[100],N,v;
  scanf("%d", &N);
  
  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;
   printf("%d",A[k]);
}
}


return 0;
}

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

#include <stdio.h>
int main(){
int n,i,v,j;
int a[100];
scanf("%d",&n);

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

for(i=1;i<n-1;++i){
v=a[i];
j=i-a;

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: invalid operands to binary - (have 'int' and 'int *')
   13 | j=i-a;
      |    ^
      |    |
      |    int *
Language: C

#include <stdio.h>
int main(){
int n,i,v,j;
int a[100];
scanf("%d",&n);

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

for(i=1;i<n-1;++i){
v=a[i];
j=i-a;

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: invalid operands to binary - (have 'int' and 'int *')
   13 | j=i-a;
      |    ^
      |    |
      |    int *
Language: C

#include <stdio.h>
int main(){
int n,i,v,j;
int a[100];
scanf("%d",&n);

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

for(i=1;i<n-1;++i){
v=a[i];
j=i-a;

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: invalid operands to binary - (have 'int' and 'int *')
   13 | j=i-a;
      |    ^
      |    |
      |    int *
Language: C

#include <stdio.h>
int main(){
int n,i,v,j;
int a[100];
scanf("%d",&n);

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

for(i=1;i<n-1;++i){
v=a[i];
j=i-a;

while(j>=0&&a[j]>v){
a[j+1]=a[j];
j--;
a[j+1]=v;
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: invalid operands to binary - (have 'int' and 'int *')
   13 | j=i-a;
      |    ^
      |    |
      |    int *
Language: C


#include<stdio.h>

void insertionSort(int A[],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;
for(i=0;i<N;i++){
if(i>0){
printf("  ");
}
printf("%d",A[i]);
}

printf("\n");
}
}

}
int main(){
    int N,i,j;
    int A[100];

     
    scanf("%d",&N);

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

printf("\n");
}
    insertionSort(A,N);
        return 0;
}

Compiler output:
main.c:26:1: error: expected identifier or '(' before '}' token
   26 | }
      | ^
main.c: In function 'main':
main.c:36:18: error: expected ';' before '}' token
   36 | scanf("%d",&A[i])
      |                  ^
      |                  ;
   37 | }
      | ~
Language: C

#include<stdio.h>
int main(void)

{
  int i,j,k,A[100],N,v;
  scanf("%d", &N);
  while(i < n){
  scanf("%d",A[i]);
  i++;
}
  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[v + 1] = v;
   for(k = 0;k < N; k++)
{  printf("%d",A[k]);
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'n' undeclared (first use in this function)
    7 |   while(i < n){
      |             ^
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C

#include <stdio.h>

int main(void)  {
  int n, i, j;
  
  int A[100];
  
  scanf("%d", &n);
  for (i = 0; i < n; i++)  
    scanf("%d", &A[i]);
  
  trace(A, n);
  insertion(A,n);
  
  return 0;
}

void trace(int A[], int )  {
  int i;
  for (i = 0; i < n; i++)  {
    if ( i > 0) 
      printf("%d", A[i]);
  }
  printf("\n");
}

void insertionSort(int A[], int n)  {
  int j, i, 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;
    trace(A, n);
  }
}
  

Compiler output:
main.c: In function 'main':
main.c:12:3: error: implicit declaration of function 'trace' [-Wimplicit-function-declaration]
   12 |   trace(A, n);
      |   ^~~~~
main.c:13:3: error: implicit declaration of function 'insertion' [-Wimplicit-function-declaration]
   13 |   insertion(A,n);
      |   ^~~~~~~~~
main.c: At top level:
main.c:18:6: warning: conflicting types for 'trace'; have 'void(int *, int)'
   18 | void trace(int A[], int )  {
      |      ^~~~~
main.c:12:3: note: previous implicit declaration of 'trace' with type 'void(int *, int)'
   12 |   trace(A, n);
      |   ^~~~~
main.c: In function 'trace':
main.c:20:19: error: 'n' undeclared (first use in this function)
   20 |   for (i = 0; i < n; i++)  {
      |                   ^
main.c:20:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void)  {
  int n, i, j;
  
  int A[100];
  
  scanf("%d", &n);
  for (i = 0; i < n; i++)  
    scanf("%d", &A[i]);
  
  trace(A, n);
  insertionSort(A,n);
  
  return 0;
}

void trace(int A[], int )  {
  int i;
  for (i = 0; i < n; i++)  {
    if ( i > 0) 
      printf("%d", A[i]);
  }
  printf("\n");
}

void insertionSort(int A[], int n)  {
  int j, i, 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;
    trace(A, n);
  }
}
  

Compiler output:
main.c: In function 'main':
main.c:12:3: error: implicit declaration of function 'trace' [-Wimplicit-function-declaration]
   12 |   trace(A, n);
      |   ^~~~~
main.c:13:3: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   13 |   insertionSort(A,n);
      |   ^~~~~~~~~~~~~
main.c: At top level:
main.c:18:6: warning: conflicting types for 'trace'; have 'void(int *, int)'
   18 | void trace(int A[], int )  {
      |      ^~~~~
main.c:12:3: note: previous implicit declaration of 'trace' with type 'void(int *, int)'
   12 |   trace(A, n);
      |   ^~~~~
main.c: In function 'trace':
main.c:20:19: error: 'n' undeclared (first use in this function)
   20 |   for (i = 0; i < n; i++)  {
      |                   ^
main.c:20:19: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:27:6: warning: conflicting types for 'insertionSort'; have 'void(int *, int)'
   27 | void insertionSort(int A[], int n)  {
      |      ^~~~~~~~~~~~~
main.c:13:3: note: previous implicit declaration of 'insertionSort' with type 'void(int *, int)'
   13 |   insertionSort(A,n);
      |   ^~~~~~~~~~~~~
Language: C

#include<stdio.h>
int main(void)

{
  int i,j,k,A[100],N,v;
  scanf("%d", &N);
  while(i < n){
  scanf("%d",A[i]);
  i++;
}
  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[v + 1] = v;
   for(k = 0;k < N; k++){ 
   printf("%d",A[k]);
}
  putchar("\n");
   
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'n' undeclared (first use in this function)
    7 |   while(i < n){
      |             ^
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:11: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   24 |   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(void)

{
  int i,j,k,A[100],N,v;
  scanf("%d", &N);
  while(i < n){
  scanf("%d",A[i]);
  i++;
}
  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[v + 1] = v;
   for(k = 0;k < N; k++){ 
   printf("%d",A[k]);
}  if(k != n-1)
  putchar("\n");
   
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'n' undeclared (first use in this function)
    7 |   while(i < n){
      |             ^
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:11: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   24 |   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(void)

{
  int i,j,k,A[100],N,v;
  scanf("%d", &N);
  while(i < n){
  scanf("%d",A[i]);
  i++;
}
  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[v + 1] = v;
   for(k = 0;k < N; k++){ 
   printf("%d",A[k]);
}  if(k != n-1)
    putchar(" ");

   }putchar("\n");
   
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'n' undeclared (first use in this function)
    7 |   while(i < n){
      |             ^
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:13: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   24 |     putchar(" ");
      |             ^~~
      |             |
      |             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:26:13: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   26 |    }putchar("\n");
      |             ^~~~
      |             |
      |             char *
/usr/include/stdio.h:618:25: note: expected 'int' but argument is of type 'char *'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
main.c: At top level:
main.c:30:1: error: expected identifier or '(' before 'return'
   30 | return 0;
      | ^~~~~~
main.c:31:1: error: expected identifier or '(' before '}' token
   31 | }
      | ^
Language: C

#include<stdio.h>

void Printfff(intA[], int n){
  int i;
  for ( i = 0; i < n; i++ ){
    printf("%d", A[i]);
    if ( i < n-1 ) printf(" ");
  } 
  printf("\n");
}

void insertionSort(A, n){
  int A[], i, j;
  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;
  }
}

int main(){

  int n, i, j;
  int A[100];

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

  return 0;
}
  

Compiler output:
main.c:3:15: error: unknown type name 'intA'; did you mean 'int'?
    3 | void Printfff(intA[], int n){
      |               ^~~~
      |               int
main.c: In function 'insertionSort':
main.c:12:6: error: type of 'A' defaults to 'int' [-Wimplicit-int]
   12 | void insertionSort(A, n){
      |      ^~~~~~~~~~~~~
main.c:12:6: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:13:7: error: 'A' redeclared as different kind of symbol
   13 |   int A[], i, j;
      |       ^
main.c:12:6: note: previous definition of 'A' with type 'int'
   12 | void insertionSort(A, n){
      |      ^~~~~~~~~~~~~
main.c:15:5: error: 'v' undeclared (first use in this function)
   15 |     v = A[i];
      |     ^
main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:20: error: expected ';' before 'j'
   18 |       A[j+1] = A[j]
      |                    ^
      |                    ;
   19 |       j--;
      |       ~             
main.c: In function 'main':
main.c:34:3: error: implicit declaration of function 'Printfff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   34 |   Printfff(A,n);
      |   ^~~~~~~~
      |   printf
Language: C

#include<stdio.h>

void Printfff(intA[], int n){
  int i;
  for ( i = 0; i < n; i++ ){
    printf("%d", A[i]);
    if ( i < n-1 ) printf(" ");
  } 
  printf("\n");
}

void insertionSort(A, n){
  int A[], i, j;
  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;
  }
}

int main(){

  int n, i, j;
  int A[100];

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

  Printfff(A,n);
  insertionSort(A,n);


  return 0;
}
  

Compiler output:
main.c:3:15: error: unknown type name 'intA'; did you mean 'int'?
    3 | void Printfff(intA[], int n){
      |               ^~~~
      |               int
main.c: In function 'insertionSort':
main.c:12:6: error: type of 'A' defaults to 'int' [-Wimplicit-int]
   12 | void insertionSort(A, n){
      |      ^~~~~~~~~~~~~
main.c:12:6: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:13:7: error: 'A' redeclared as different kind of symbol
   13 |   int A[], i, j;
      |       ^
main.c:12:6: note: previous definition of 'A' with type 'int'
   12 | void insertionSort(A, n){
      |      ^~~~~~~~~~~~~
main.c:15:5: error: 'v' undeclared (first use in this function)
   15 |     v = A[i];
      |     ^
main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:20: error: expected ';' before 'j'
   18 |       A[j+1] = A[j]
      |                    ^
      |                    ;
   19 |       j--;
      |       ~             
main.c: In function 'main':
main.c:33:3: error: implicit declaration of function 'Printfff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   33 |   Printfff(A,n);
      |   ^~~~~~~~
      |   printf
Language: C

#include<stdio.h>

void Printfff(int A[], int n){
  int i;
  for ( i = 0; i < n; i++ ){
    printf("%d", A[i]);
    if ( i < n-1 ) printf(" ");
  } 
  printf("\n");
}

void insertionSort(A, n){
  int A[], i, j;
  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;
  }
}

int main(){

  int n, i, j;
  int A[100];

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

  Printfff(A,n);
  insertionSort(A,n);


  return 0;
}
  

Compiler output:
main.c: In function 'insertionSort':
main.c:12:6: error: type of 'A' defaults to 'int' [-Wimplicit-int]
   12 | void insertionSort(A, n){
      |      ^~~~~~~~~~~~~
main.c:12:6: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:13:7: error: 'A' redeclared as different kind of symbol
   13 |   int A[], i, j;
      |       ^
main.c:12:6: note: previous definition of 'A' with type 'int'
   12 | void insertionSort(A, n){
      |      ^~~~~~~~~~~~~
main.c:15:5: error: 'v' undeclared (first use in this function)
   15 |     v = A[i];
      |     ^
main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:20: error: expected ';' before 'j'
   18 |       A[j+1] = A[j]
      |                    ^
      |                    ;
   19 |       j--;
      |       ~
Language: C

#include<stdio.h>

void Printfff(int A[], int n){
  int i;
  for ( i = 0; i < n; i++ ){
    printf("%d", A[i]);
    if ( i < n-1 ) printf(" ");
  } 
  printf("\n");
}

void insertionSort(A, n){
  int A[], i, j;
  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;
  }
}

int main(){

  int n, i, j;
  int A[100];

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

  Printfff(A, n);
  insertionSort(A, n);


  return 0;
}
  

Compiler output:
main.c: In function 'insertionSort':
main.c:12:6: error: type of 'A' defaults to 'int' [-Wimplicit-int]
   12 | void insertionSort(A, n){
      |      ^~~~~~~~~~~~~
main.c:12:6: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:13:7: error: 'A' redeclared as different kind of symbol
   13 |   int A[], i, j;
      |       ^
main.c:12:6: note: previous definition of 'A' with type 'int'
   12 | void insertionSort(A, n){
      |      ^~~~~~~~~~~~~
main.c:15:5: error: 'v' undeclared (first use in this function)
   15 |     v = A[i];
      |     ^
main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:20: error: expected ';' before 'j'
   18 |       A[j+1] = A[j]
      |                    ^
      |                    ;
   19 |       j--;
      |       ~
Language: C

#include<stdio.h>

void Printfff(int A[], int n){
  int i;
  for ( i = 0; i < n; i++ ){
    printf("%d", A[i]);
    if ( i < n-1 ) printf(" ");
  } 
  printf("\n");
}

void insertionSort(A[], n){
  int A[], i, j;
  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;
  }
}

int main(){

  int n, i, j;
  int A[100];

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

  Printfff(A, n);
  insertionSort(A, n);


  return 0;
}
  

Compiler output:
main.c:12:20: error: unknown type name 'A'
   12 | void insertionSort(A[], n){
      |                    ^
main.c:12:25: error: unknown type name 'n'
   12 | void insertionSort(A[], n){
      |                         ^
main.c: In function 'main':
main.c:34:3: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   34 |   insertionSort(A, n);
      |   ^~~~~~~~~~~~~
Language: C

#include<stdio.h>

void Printfff(int A[], int n){
  int i;
  for ( i = 0; i < n; i++ ){
    printf("%d", A[i]);
    if ( i < n-1 ) printf(" ");
  } 
  printf("\n");
}

void insertionSort(int A[], int n){
  int A[], i, j;
  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;
  }
}

int main(){

  int n, i, j;
  int A[100];

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

  Printfff(A, n);
  insertionSort(A, n);


  return 0;
}
  

Compiler output:
main.c: In function 'insertionSort':
main.c:13:7: error: 'A' redeclared as different kind of symbol
   13 |   int A[], i, j;
      |       ^
main.c:12:24: note: previous definition of 'A' with type 'int *'
   12 | void insertionSort(int A[], int n){
      |                    ~~~~^~~
main.c:15:5: error: 'v' undeclared (first use in this function)
   15 |     v = A[i];
      |     ^
main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:20: error: expected ';' before 'j'
   18 |       A[j+1] = A[j]
      |                    ^
      |                    ;
   19 |       j--;
      |       ~
Language: C

#include<stdio.h>

void Printfff(int A[], int n){
  int i;
  for ( i = 0; i < n; i++ ){
    printf("%d", A[i]);
    if ( i < n-1 ) printf(" ");
  } 
  printf("\n");
}

void insertionSort(int A[], int n){
  int v, i, j;
  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;
  }
}

int main(){

  int n, i, j;
  int A[100];

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

  Printfff(A, n);
  insertionSort(A, n);


  return 0;
}
  

Compiler output:
main.c: In function 'insertionSort':
main.c:18:20: error: expected ';' before 'j'
   18 |       A[j+1] = A[j]
      |                    ^
      |                    ;
   19 |       j--;
      |       ~
Language: C

#include<stdio.h>

void Printfff(int A[], int n){
  int i;
  for ( i = 0; i < n; i++ ){
    printf("%d", A[i]);
    if ( i < n-1 ) printf(" ");
  } 
  printf("\n");
}

void insertionSort(int A[], int n){
  int v, i, j;
  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;
  }
}

int main(){

  int n, i, j;
  int A[100];

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

  Printfff(A, n);
  insertionSort(A, n);


  return 0;
}
  

Compiler output:
main.c: In function 'insertionSort':
main.c:18:20: error: expected ';' before 'j'
   18 |       A[j+1] = A[j]
      |                    ^
      |                    ;
   19 |       j--;
      |       ~
Language: C

#include<stdio.h>

void Printfff(int A[], int n){
  int i;
  for ( i = 0; i < n; i++ ){
    printf("%d", A[i]);
    if ( i < n-1 ) printf(" ");
  } 
  printf("\n");
}

void insertionSort(int A[], int n){
  int v, i, j;
  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;
  Printfff(A[], n);
  }
}

int main(){

  int n, i;
  int A[100];

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

  Printfff(A, n);
  insertionSort(A, n);


  return 0;
}
  

Compiler output:
main.c: In function 'insertionSort':
main.c:22:14: error: expected expression before ']' token
   22 |   Printfff(A[], n);
      |              ^