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

#include<stdio.h>
using namespace std;
void trace(int A[],int N){
int i;
for(i=0;i<N;i++){
if(i>0)printf(" ");

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);
}
}
int main(){
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;
]

Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:33:1: error: expected statement before ']' token
   33 | ]
      | ^
main.c:33:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
void trace(int A[],int N){
int i;
for(i=0;i<N;i++){
if(i>0)printf(" ");
 
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);
}
}
int main(){
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;
]

Compiler output:
main.c: In function 'main':
main.c:32:1: error: expected statement before ']' token
   32 | ]
      | ^
main.c:32:1: error: expected declaration or statement at end of input
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:11: 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:11: 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:29:3: error: expected identifier or '(' before 'return'
   29 |   return 0;
      |   ^~~~~~
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
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[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:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
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[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:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C

#include<stdio.h>

int main(void){

int o,n,k,i,j;

int key;
int a[101];

scanf("%d",&n);

for(i=1;i<=n;i++)

scanf("%d",&a[i]);
??
for(o=1;o<=n;o++){

if(o == n){
printf("%d\n",a[o]);
}

else{
printf("%d ",a[o]);
}

}

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

while(i>0 && a[i]>key){

a[i+1]=a[i];
i = i-1;

}

a[i+1] = key;

for(k=1;k<=n;k++){


if(k == n){
printf("%d\n",a[k]);
}

else{
printf("%d ",a[k]);
}

}

}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:1: error: expected expression before '?' token
   15 | ??
      | ^
Language: C

#include<stdio.h>

int main(void){

int o,n,k,i,j;

int key;
int a[101];

scanf("%d",&n);

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

for(o=1;o<=n;o++){

if(o == n){
printf("%d\n",a[o]);
}

else{
printf("%d ",a[o]);
}

}

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

while(i>0 && a[i]>key){

a[i+1]=a[i];
i = i-1;

}

a[i+1] = key;

for(k=1;k<=n;k++){


if(k == n){
printf("%d\n",a[k]);
}

else{
printf("%d ",a[k]);
}

}

}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:29:1: error: expected expression before '?' token
   29 | ??
      | ^
Language: C

#include<stdio.h>
??
int main(void){
??????
????int X,Y[100],i,j,v,k;
??????
????scanf("%d",&X);
??????
????for(i=0; i < X; i++){

????????scanf("%d",&Y[i]);

????}
??
for(i=1; i <= X; i++){

for(v=0; v< X; v++){

????????????printf("%d",Y[v]);

????????????if(v==X-1)

????????break;

????????????else printf(" ");
??}
??
printf("\n");
??
v=Y[i];

????j=i-1;
??
????while(j >=0 && Y[j] > v){

????????Y[j+1]=Y[j];

????????j--;

????????Y[j+1]=v;

????}

??}
????
????return 0;
????}

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

#include <stdio.h>

int main(void) {
????????int a[100], v;
????????int N, i, j;
??????????
????????scanf("%d", &N);
????????for (i = 0; i < N; i++) {
????????????????scanf("%d", &a[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[j+1] = v;
??????????????????
????????????????for (j = 0; j < N; j++) {
????????????????????????if (j < N-1) {
????????????????????????????????printf("%d ", a[j]);
????????????????????????}
????????????????????????else {
????????????????????????????????printf("%d\n", a[j]);
????????????????????????}
????????????????}
????????}
??????????
????????return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:1: error: expected expression before '?' token
    4 | ????????int a[100], v;
      | ^
main.c:5:1: error: expected expression before '?' token
    5 | ????????int N, i, j;
      | ^
main.c:6:1: error: expected expression before '?' token
    6 | ??????????
      | ^
main.c:7:22: error: 'N' undeclared (first use in this function)
    7 | ????????scanf("%d", &N);
      |                      ^
main.c:7:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:1: error: expected expression before '?' token
    8 | ????????for (i = 0; i < N; i++) {
      | ^
Language: C

#include <stdio.h>
#include <iostream>
??
int main() {
????????int a[100], v;
????????int N, i, j;
??????????
????????scanf("%d", &N);
????????for (i = 0; i < N; i++) {
????????????????scanf("%d", &a[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[j+1] = v;
??????????????????
????????????????for (j = 0; j < N; j++) {
????????????????????????if (j < N-1) {
????????????????????????????????printf("%d ", a[j]);
????????????????????????}
????????????????????????else {
????????????????????????????????printf("%d\n", a[j]);
????????????????????????}
????????????????}
????????}
??????????
????????return 0;
}

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

#include <stdio.h>

int main() {
????????int a[100], v;
????????int N, i, j;
??????????
????????scanf("%d", &N);
????????for (i = 0; i < N; i++) {
????????????????scanf("%d", &a[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[j+1] = v;
??????????????????
????????????????for (j = 0; j < N; j++) {
????????????????????????if (j < N-1) {
????????????????????????????????printf("%d ", a[j]);
????????????????????????}
????????????????????????else {
????????????????????????????????printf("%d\n", a[j]);
????????????????????????}
????????????????}
????????}
??????????
????????return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:1: error: expected expression before '?' token
    4 | ????????int a[100], v;
      | ^
main.c:5:1: error: expected expression before '?' token
    5 | ????????int N, i, j;
      | ^
main.c:6:1: error: expected expression before '?' token
    6 | ??????????
      | ^
main.c:7:22: error: 'N' undeclared (first use in this function)
    7 | ????????scanf("%d", &N);
      |                      ^
main.c:7:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:1: error: expected expression before '?' token
    8 | ????????for (i = 0; i < N; i++) {
      | ^
Language: C

#include<stdio.h>
??
int main(void){
????????int i, j, k;
????????int N;
????????scanf("%d\n", &N);
??
????????int A[N];
????????for(i = 0; i < N; i++)
????????????????scanf("%d", &A[i]);
????????for(i = 0; i < N; i++) {
????????????????if(i == N-1)
????????????????????????printf("%d\n", A[i]);
????????????????else
????????????????????????printf("%d ",A[i]);
????????}
??
????????for(i = 1; i < N; i++) {
????????????????int x = A[i];
????????????????j = i - 1;
????????????????while(j >= 0 && A[j] > x) {
????????????????????????A[j+1] = A[j];
????????????????????????j--;
????????????????}
????????????????A[j+1] = x;
??
????????????????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:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
Language: C

#include<stdio.h>
??
int main(){
????????int i, j, k;
????????int N;
????????scanf("%d\n", &N);
??
????????int A[N];
????????for(i = 0; i < N; i++)
????????????????scanf("%d", &A[i]);
????????for(i = 0; i < N; i++) {
????????????????if(i == N-1)
????????????????????????printf("%d\n", A[i]);
????????????????else
????????????????????????printf("%d ",A[i]);
????????}
??
????????for(i = 1; i < N; i++) {
????????????????int key = A[i];
????????????????j = i - 1;
????????????????while(j >= 0 && A[j] > key) {
????????????????????????A[j+1] = A[j];
????????????????????????j--;
????????????????}
????????????????A[j+1] = key;
??
????????????????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:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
Language: C

#include<stdio.h>
int main(void)
{
  int i,j,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;
  printf("%d",A[k]);
}  if(k != n - 1)
   putchar(" ");
}  putchar("\n");
}
return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:6:13: error: 'n' undeclared (first use in this function)
    6 |   while(i < n){
      |             ^
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:17: error: 'k' undeclared (first use in this function)
   20 |   printf("%d",A[k]);
      |                 ^
main.c:22:12: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   22 |    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: At top level:
main.c:23:12: error: expected declaration specifiers or '...' before string constant
   23 | }  putchar("\n");
      |            ^~~~
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^
main.c:25:1: error: expected identifier or '(' before 'return'
   25 | return 0;
      | ^~~~~~
main.c:26:1: error: expected identifier or '(' before '}' token
   26 | }
      | ^
Language: C

#include<stdio.h>
??
int main(void){
??
????????int a[100];
??
????????int t,b,temp,s,l,q,r;
??
????????scanf("%d",&b);
??
????????for(t=0;t<b;t++){
??????????????scanf("%d",&a[t]);
????????}
??
????????for(s=0;s<b-1;s++){
??????????????printf("%d ",a[s]);
????????}
????????printf("%d\n",a[b-1]);
??
????????for(t=1;t<b;t++){
??????????????l = t-1;
??????????????q=t;
??????????????r=l;
??????????????while(a[l]>a[t]){
????????????????????????temp=a[l];
????????????????????????a[l]=a[t];
????????????????????????a[t]=temp;
????????????????????????if(t!=1){
????????????????????????????l--;
????????????????????????????t--;
????????????????????????}
??????????????}
??????????????t=q;
??????????????l=r;
??????????????for(s=0;s<b-1;s++){
????????????????????printf("%d ",a[s]);
??????????????}
??????????????printf("%d\n",a[b-1]);
????????}
??
????????return 0;
}

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

#include<stdio.h>
int main(){
??
????int i,j,k,n,v,A[1000];
??????
????scanf("%d", &n );
??
????for ( i = 0 ; i < n ; i++ ){
????????scanf("%d", &A[i] );
????}
??????????
????for ( i = 0 ; i < n ; i++ ){
??
????????v = A[i];
??????????
????????for ( j = 0 ; j < i ; j++ ){
????????????if ( v <= A[j] ){
????????for ( k = i ; k > j ; k-- ){
????????????A[k] = A[ k - 1 ];
????????}
????????A[j] = v;
????????break;
????????????}
????????}
??
????????for ( j = 0 ; j < n ; j++ ){
????????????if ( j == n - 1 ) {
????????printf("%d\n", A[j] );
????????????} else {
????????printf("%d ", A[j] );
????????????} 
????????}
??
????}
??
????return 0;
??
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: expected expression before '?' token
    3 | ??
      | ^
main.c:5:1: error: expected expression before '?' token
    5 | ??????
      | ^
main.c:6:18: error: 'n' undeclared (first use in this function)
    6 | ????scanf("%d", &n );
      |                  ^
main.c:6:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:1: error: expected expression before '?' token
    7 | ??
      | ^
main.c:37:1: error: expected expression before '?' token
   37 | ??
      | ^
Language: C

#include<stdio.h>

int main(void)

 int i,j,k,N,v,A[1000];

 scanf("%d", &N);

 for(i=0;i<N;i++){

  scanf("%d", &A[i]);

 }

 for(i=0;i<N;i++){

 v=A[i];

 for(j=0;j<i;j++){

 if(v<=A[j]){

 for(k=i;k>j;k--){

 A[k]=A[k-1];
 
 }

 A[j]=v;

 break;

  }

 }

 for(j=0;j<N;j++){

 if(j==N-1){

 printf("%d\n", A[j]);

 }else{

 printf("%d", A[j])+

  }

 }
 }
 return 0;

}

Compiler output:
main.c: In function 'main':
main.c:7:2: error: expected declaration specifiers before 'scanf'
    7 |  scanf("%d", &N);
      |  ^~~~~
main.c:9:2: error: expected declaration specifiers before 'for'
    9 |  for(i=0;i<N;i++){
      |  ^~~
main.c:9:10: error: expected declaration specifiers before 'i'
    9 |  for(i=0;i<N;i++){
      |          ^
main.c:9:14: error: expected declaration specifiers before 'i'
    9 |  for(i=0;i<N;i++){
      |              ^
main.c:15:2: error: expected declaration specifiers before 'for'
   15 |  for(i=0;i<N;i++){
      |  ^~~
main.c:15:10: error: expected declaration specifiers before 'i'
   15 |  for(i=0;i<N;i++){
      |          ^
main.c:15:14: error: expected declaration specifiers before 'i'
   15 |  for(i=0;i<N;i++){
      |              ^
main.c:51:2: error: expected declaration specifiers before 'return'
   51 |  return 0;
      |  ^~~~~~
main.c:53:1: error: expected declaration specifiers before '}' token
   53 | }
      | ^
main.c:3:5: error: old-style parameter declarations in prototyped function definition
    3 | int main(void)
      |     ^~~~
main.c:54: error: expected '{' at end of input
Language: C

#include<stdio.h>

int main(void)

 int i,j,k,N,v,A[1000];

 scanf("%d", &N);

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

 }

 for(i = 0;i < N; i++){

 v=A[i];

 for(j = 0;j < i; j++){

 if(v<=A[j]){

 for(k = i;k > j ;k--){

 A[k]=A[k-1];
 
 }

 A[j]=v;

 break;

  }

 }

 for(j = 0;j < N; j++){

 if(j == N-1){

 printf("%d\n", A[j]);

 }else{

 printf("%d", A[j]);

  }

 }
 }
 return 0;

}

Compiler output:
main.c: In function 'main':
main.c:7:2: error: expected declaration specifiers before 'scanf'
    7 |  scanf("%d", &N);
      |  ^~~~~
main.c:9:2: error: expected declaration specifiers before 'for'
    9 |  for(i = 0;i < N; i++){
      |  ^~~
main.c:9:12: error: expected declaration specifiers before 'i'
    9 |  for(i = 0;i < N; i++){
      |            ^
main.c:9:19: error: expected declaration specifiers before 'i'
    9 |  for(i = 0;i < N; i++){
      |                   ^
main.c:15:2: error: expected declaration specifiers before 'for'
   15 |  for(i = 0;i < N; i++){
      |  ^~~
main.c:15:12: error: expected declaration specifiers before 'i'
   15 |  for(i = 0;i < N; i++){
      |            ^
main.c:15:19: error: expected declaration specifiers before 'i'
   15 |  for(i = 0;i < N; i++){
      |                   ^
main.c:51:2: error: expected declaration specifiers before 'return'
   51 |  return 0;
      |  ^~~~~~
main.c:53:1: error: expected declaration specifiers before '}' token
   53 | }
      | ^
main.c:3:5: error: old-style parameter declarations in prototyped function definition
    3 | int main(void)
      |     ^~~~
main.c:54: error: expected '{' at end of input
Language: C

#include<stdio.h>

int main()

 int i,j,k,N,v,A[1000];

 scanf("%d", &N);

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

 }

 for(i = 0 ; i < N ; i++){

 v=A[i];

 for(j = 0 ; j < i ; j++){

 if(v <= A[j]){

 for(k = i;k > j ;k--){

 A[k]=A[k-1];
 
 }

 A[j]=v;

 break;

  }

 }

 for(j = 0;j < N; j++){

 if(j == N-1){

 printf("%d\n", A[j]);

 }else{

 printf("%d", A[j]);

  }

 }
 }
 return 0;

}

Compiler output:
main.c: In function 'main':
main.c:7:2: error: expected declaration specifiers before 'scanf'
    7 |  scanf("%d", &N);
      |  ^~~~~
main.c:9:2: error: expected declaration specifiers before 'for'
    9 |  for(i = 0 ; i < N ; i++){
      |  ^~~
main.c:9:14: error: expected declaration specifiers before 'i'
    9 |  for(i = 0 ; i < N ; i++){
      |              ^
main.c:9:22: error: expected declaration specifiers before 'i'
    9 |  for(i = 0 ; i < N ; i++){
      |                      ^
main.c:15:2: error: expected declaration specifiers before 'for'
   15 |  for(i = 0 ; i < N ; i++){
      |  ^~~
main.c:15:14: error: expected declaration specifiers before 'i'
   15 |  for(i = 0 ; i < N ; i++){
      |              ^
main.c:15:22: error: expected declaration specifiers before 'i'
   15 |  for(i = 0 ; i < N ; i++){
      |                      ^
main.c:51:2: error: expected declaration specifiers before 'return'
   51 |  return 0;
      |  ^~~~~~
main.c:53:1: error: expected declaration specifiers before '}' token
   53 | }
      | ^
main.c:5:16: error: declaration for parameter 'A' but no such parameter
    5 |  int i,j,k,N,v,A[1000];
      |                ^
main.c:5:14: error: declaration for parameter 'v' but no such parameter
    5 |  int i,j,k,N,v,A[1000];
      |              ^
main.c:5:12: error: declaration for parameter 'N' but no such parameter
    5 |  int i,j,k,N,v,A[1000];
      |            ^
main.c:5:10: error: declaration for parameter 'k' but no such parameter
    5 |  int i,j,k,N,v,A[1000];
      |          ^
main.c:5:8: error: declaration for parameter 'j' but no such parameter
    5 |  int i,j,k,N,v,A[1000];
      |        ^
main.c:5:6: error: declaration for parameter 'i' but no such parameter
    5 |  int i,j,k,N,v,A[1000];
      |      ^
main.c:54: error: expected '{' at end of input
Language: C

#include<stdio.h>
??
int main(void){
??
??int i,j,k,N,v,A[1000];
??
??scanf("%d", &N);
??
??for(i = 0 ; i < N ; i++){
????
????scanf("%d", &A[i]);
??
??}
??
??for(i = 0 ; i < N ; i++){
??
??v=A[i];
??
??for(j = 0 ; j < i ; j++){
??
??if(v <= A[j]){
??
??for(k = i;k > j ;k--){
??
??A[k]=A[k-1];
????
??}
??
??A[j]=v;
??
??break;
??
????}
??
??}
??
??for(j = 0;j < N; j++){
??
??if(j == N-1){
??
??printf("%d\n", A[j]);
??
??}else{
??
??printf("%d", A[j]);
??
????}
??
??}
??}
??return 0;
??
}

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

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

int i,j,k,N,v,A[1000];
??
scanf("%d", &N);
??
for(i = 0 ; i < N ; i++){
????
scanf("%d", &A[i]);
??
}
??
for(i = 0 ; i < N ; i++){
??
v=A[i];
??
for(j = 0 ; j < i ; j++){
??
if(v <= A[j]){
??
for(k = i;k > j ;k--){
??
A[k]=A[k-1];
????
}
??
A[j]=v;
??
break;
??
}
??
}
??
for(j = 0;j < N; j++){
??
if(j == N-1){
??
printf("%d\n", A[j]);
??
}else{
??
printf("%d", A[j]);
??
}
??
}
}
return 0;
??
}

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

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

  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d "N);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d "N);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:14: error: expected ')' before 'N'
    4 |   scanf("%d "N);
      |        ~     ^
      |              )
main.c:20:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |   printf("%d", A[k]);
      |   ^~~~~~
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   24 |   printf("\n");
      |   ^~~~~~
main.c:24:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
 void kansu(int A[],int N){
for(i=0;i<N;i++){
if(i>0){
printf("  ");
}
printf("%d",A[i]);
}
 
printf("\n");
}

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;
kansu(A,N);

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

 
   
   kansu(A,N);
    insertionSort(A,N);
        return 0;
}

Compiler output:
main.c: In function 'kansu':
main.c:3:5: error: 'i' undeclared (first use in this function)
    3 | for(i=0;i<N;i++){
      |     ^
main.c:3:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
 void kansu(int A[],int N){
for(i=0;i<N;i++){
if(i>0){
printf("  ");
}
printf("%d",A[i]);
}
 
printf("\n");
}

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;
kansu(A,N);

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

 
   
   kansu(A,N);
    insertionSort(A,N);
        return 0;
}

Compiler output:
main.c: In function 'kansu':
main.c:3:5: error: 'i' undeclared (first use in this function)
    3 | for(i=0;i<N;i++){
      |     ^
main.c:3:5: 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++){ 
        j=i;
        while ((j > 0) && (A[j-1] >A[j])) {
            swap(&A[j-1], &A[j]);
	        j--;
	        show(A,N);
        }
    }
}

void swap(int A[],int i, int j) {
    int tmp;
    tmp = A[i];
    A[i] = A[j];
    A[j] = tmp;
}
void show(int A[],int N){
	int i;
	for(i=;i<N;i++){	
		printf("%d",A[i]);
	}
}

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

}

Compiler output:
main.c: In function 'insertionSort':
main.c:6:13: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
    6 |             swap(&A[j-1], &A[j]);
      |             ^~~~
main.c:8:17: error: implicit declaration of function 'show' [-Wimplicit-function-declaration]
    8 |                 show(A,N);
      |                 ^~~~
main.c: At top level:
main.c:13:6: warning: conflicting types for 'swap'; have 'void(int *, int,  int)'
   13 | void swap(int A[],int i, int j) {
      |      ^~~~
main.c:6:13: note: previous implicit declaration of 'swap' with type 'void(int *, int,  int)'
    6 |             swap(&A[j-1], &A[j]);
      |             ^~~~
main.c:19:6: warning: conflicting types for 'show'; have 'void(int *, int)'
   19 | void show(int A[],int N){
      |      ^~~~
main.c:8:17: note: previous implicit declaration of 'show' with type 'void(int *, int)'
    8 |                 show(A,N);
      |                 ^~~~
main.c: In function 'show':
main.c:21:15: error: expected expression before ';' token
   21 |         for(i=;i<N;i++){
      |               ^
main.c:22:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |                 printf("%d",A[i]);
      |                 ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | void insertionSort(int A[], int N){
main.c:22:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |                 printf("%d",A[i]);
      |                 ^~~~~~
main.c:22:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'main':
main.c:28:13: error: array size missing in 'A'
   28 |         int A[];
      |             ^
main.c:29:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   29 |         scanf("%d",&N);
      |         ^~~~~
main.c:29:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:29:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
main.c:29:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
Language: C

#include<stdio.h>

void insertionSort(int A[], int N);
void swap(int A[],int i, int j);
void show(int A[],int N);
void main(void);

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

void swap(int A[],int i, int j) {
    int tmp;
    tmp = A[i];
    A[i] = A[j];
    A[j] = tmp;
}
void show(int A[],int N){
	int i;
	for(i=;i<N;i++){	
		printf("%d",A[i]);
	}
}

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

}

Compiler output:
main.c: In function 'insertionSort':
main.c:13:27: error: passing argument 2 of 'swap' makes integer from pointer without a cast [-Wint-conversion]
   13 |             swap(&A[j-1], &A[j]);
      |                           ^~~~~
      |                           |
      |                           int *
main.c:4:23: note: expected 'int' but argument is of type 'int *'
    4 | void swap(int A[],int i, int j);
      |                   ~~~~^
main.c:13:13: error: too few arguments to function 'swap'
   13 |             swap(&A[j-1], &A[j]);
      |             ^~~~
main.c:4:6: note: declared here
    4 | void swap(int A[],int i, int j);
      |      ^~~~
main.c: In function 'show':
main.c:28:15: error: expected expression before ';' token
   28 |         for(i=;i<N;i++){
      |               ^
main.c: In function 'main':
main.c:35:13: error: array size missing in 'A'
   35 |         int A[];
      |             ^
Language: C

#include <stdio.h>

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

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

Compiler output:
main.c:3:28: error: unknown type name 'N'
    3 | void insertionSort(int A[],N){
      |                            ^
main.c: In function 'main':
main.c:28:9: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   28 |         insertionSort(A,N);
      |         ^~~~~~~~~~~~~
Language: C

#include <stdio.h>

insertionSort(int* A, int n) {
	int i, v, 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;
		for (i = 0; i < n; ++i) {
			printf("%d", a[i]);
			if (i != n - 1) {
				printf(" ");
			} else {
				printf("%s\n", );
			}
		}
	}
}

int main(int argc, char const *argv[]) {
	int i, n;
	int a[100];
	scanf("%d", &n);
	for (int i = 0; i < n; ++i) {
		scanf("%d", &a[i]);
	}
	insertionSort(a, n);
	return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | insertionSort(int* A, int n) {
      | ^~~~~~~~~~~~~
main.c: In function 'insertionSort':
main.c:6:21: error: 'a' undeclared (first use in this function)
    6 |                 v = a[i];
      |                     ^
main.c:6:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:48: error: expected expression before ')' token
   18 |                                 printf("%s\n", );
      |                                                ^
Language: C

#include<stdio.h>

int main()
{	int j;
	int N;
	int i=0;
	long v;

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

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:40: error: expected ';' before 'for'
   19 |                 printf("%ld\n",A[i])
      |                                     ^   
      |                                        ;
   20 | 
   21 |         for(i=1;i<N;i++){
      |         ~~~
Language: C

#include<stdio.h>
void inserttionsort(int num[], int array_size);

int main(){
  int N,i,j;
  scanf("%d",&N);
  int A[N];
  for(i=0; i<N;i++){
    scanf("%d",&A[N]);
  }
  for(i =1;i<N;i++){
    int v = A[i];
    j = i-1
      while(j>=0){
        if(A[j]>v){
          A[j+1]=A[j];
          j--;
          A[j] = v
        }
      }
    return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:13:12: error: expected ';' before 'while'
   13 |     j = i-1
      |            ^
      |            ;
   14 |       while(j>=0){
      |       ~~~~~ 
main.c:22:3: error: expected declaration or statement at end of input
   22 |   }
      |   ^
Language: C

#include<stdio.h>

void intsertionSort(A[],N){
    int i,j,v;
    for(i=1;i<=N-1;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[j]);
    }
}

int main(){
    int a,i,num[1000];
    scanf("%d",&a);
    for(i=0;i<a;i++){
        scanf("%d",&num[i]);        
    }
    intsertionSort(num[],a);

}

Compiler output:
main.c:3:21: error: unknown type name 'A'
    3 | void intsertionSort(A[],N){
      |                     ^
main.c:3:25: error: unknown type name 'N'
    3 | void intsertionSort(A[],N){
      |                         ^
main.c: In function 'main':
main.c:23:5: error: implicit declaration of function 'intsertionSort' [-Wimplicit-function-declaration]
   23 |     intsertionSort(num[],a);
      |     ^~~~~~~~~~~~~~
main.c:23:24: error: expected expression before ']' token
   23 |     intsertionSort(num[],a);
      |                        ^
Language: C

#include<stdio.h>

insertionSort(int a[], int n){
	int i,j,k;
	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(k=0;k<N;k++){
			printf("%d",a[k]);
		}
		printf("\n");
	}
}

int main(void){
	int len:
	scanf("&d",&len);
	int Num[len];
	int i;
	for(i=0;i<N;i++){
		scanf("%d",&Num[i]);
		printf(Num[i]);
	}
	printf("\n");
	insertionSort(Num,len);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | insertionSort(int a[], int n){
      | ^~~~~~~~~~~~~
main.c: In function 'insertionSort':
main.c:5:19: error: 'N' undeclared (first use in this function)
    5 |         for(i=1;i<N;i++){
      |                   ^
main.c:5:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:17: error: 'v' undeclared (first use in this function)
    6 |                 v=A[i];
      |                 ^
main.c:6:19: error: 'A' undeclared (first use in this function)
    6 |                 v=A[i];
      |                   ^
main.c: In function 'main':
main.c:21:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   21 |         int len:
      |                ^
main.c:21:16: error: expected expression before ':' token
main.c:23:17: error: 'len' undeclared (first use in this function)
   23 |         int Num[len];
      |                 ^~~
main.c:25:19: error: 'N' undeclared (first use in this function)
   25 |         for(i=0;i<N;i++){
      |                   ^
Language: C

#include<stdio.h>
void inserttionsort(int num[], int array_size);

int main(){
  int N,i,j;
  scanf("%d",&N);
  int A[N];
  for(i=0; i<N;i++){
    scanf("%d",&A[N]);
  }
  for(i =1;i<N;i++){
    int v = A[i];
    j = i-1;
      while(j>=0){
        if(A[j]>v){
          A[j+1]=A[j];
          j--;
          A[j] = v
        }
      }
    return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:18:19: error: expected ';' before '}' token
   18 |           A[j] = v
      |                   ^
      |                   ;
   19 |         }
      |         ~          
main.c:22:3: error: expected declaration or statement at end of input
   22 |   }
      |   ^
Language: C

#include<stdio.h>

int A[100],N;
void intsertionSort(A[],N){
    int i,j,v;
    for(i=1;i<=N-1;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[j]);
    }
}

int main(){
    int a,i,num[100];
    scanf("%d",&a);
    for(i=0;i<a;i++){
        scanf("%d",&num[i]);        
    }
    intsertionSort(num[],a);

}

Compiler output:
main.c:4:21: error: expected declaration specifiers or '...' before 'A'
    4 | void intsertionSort(A[],N){
      |                     ^
main.c:4:25: error: expected declaration specifiers or '...' before 'N'
    4 | void intsertionSort(A[],N){
      |                         ^
main.c: In function 'main':
main.c:24:5: error: implicit declaration of function 'intsertionSort' [-Wimplicit-function-declaration]
   24 |     intsertionSort(num[],a);
      |     ^~~~~~~~~~~~~~
main.c:24:24: error: expected expression before ']' token
   24 |     intsertionSort(num[],a);
      |                        ^
Language: C

#include<stdio.h>
void inserttionsort(int num[], int array_size);

int main(){
  int N,i,j;
  scanf("%d",&N);
  int A[N];
  for(i=0; i<N;i++){
    scanf("%d",&A[N]);
  }
  for(i =1;i<N;i++){
    int v = A[i];
    j = i-1;
      while(j>=0){
        if(A[j]>v){
          A[j+1]=A[j];
          j--;
          A[j] = v;
        }
      }
    return 0;
  }

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

#include<stdio.h>
void insertionsort(int num[], int array_size);

int main(){
  int N,i,j;
  scanf("%d",&N);
  int A[N];
  for(i=0; i<N;i++){
    scanf("%d",&A[N]);
  }
  for(i =1;i<N;i++){
    int v = A[i];
    j = i-1;
    while(j>=0){
        if(A[j]>v){
          A[j+1]=A[j];
          j--;
          A[j] = v;
        }
      }
      return 0;
  }

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

#include<stdio.h>

void trace(int A[], int N){
    int i ;
    for(i=0; I<N;i++){
        if(i>0){
            printf(" ");
        }
        printf("%d", A[i]);
    }
    printf("\n");
}
void intsertionSort(int A[], int N){
    int i,j,v;
    for(i=1;i<=N-1;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(){
    int a,i,num[100];
    scanf("%d",&a);
    for(i=0;i<a;i++){
        scanf("%d",&num[i]);        
    }
    trace(A, N);
    intsertionSort(num,a);
}

Compiler output:
main.c: In function 'trace':
main.c:5:14: error: 'I' undeclared (first use in this function)
    5 |     for(i=0; I<N;i++){
      |              ^
main.c:5:14: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:33:11: error: 'A' undeclared (first use in this function)
   33 |     trace(A, N);
      |           ^
main.c:33:14: error: 'N' undeclared (first use in this function)
   33 |     trace(A, N);
      |              ^
Language: C

#include <stdio.h>
#define M 1002

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

void insertsort(int p, int a[]){

	int pp=p,dum_a,dum_b,i;

	for(i=0;i<p;i++){
		if(a[p]<a[i]){
		 pp=i;
		 dum_a=a[p];
		 break;
		}
	}

	if(i==p) return;

	for(i=pp;i<p+1;i++){
		dum_b=a[i];
		a[i]=dum_a;
		dum_a=dum_b;
	}

	return;

}

int main(void){
	int i,n,a[M];
	scanf("%d",&n);

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

	for(i=0;i<n-1;i++){
		insertsort(i,a);
		printline(n,a);
		printf(" \n");
	}

	insertsort(n-1,a);
	printline(n,a);
	printf("\n");

	return 0;

}

Compiler output:
main.c: In function 'printline':
main.c:6:26: error: expected ';' before 'for'
    6 |         printf("%d",a[1])
      |                          ^
      |                          ;
    7 |         for(i=0;i<n;i++){
      |         ~~~
Language: C

#include<stdio.h>

int main(){
  int n,a[1000];
  int v;
  int i,j,k;

  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%d",&a[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[j+1]=v;
    for(k=0;k<n;k++){
      printf("%d",a[k]);
      if(k<n-1)
	prinf(" ");
    printf("\n");
  }

  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:9: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   23 |         prinf(" ");
      |         ^~~~~
      |         printf
main.c:29:1: error: expected declaration or statement at end of input
   29 | }
      | ^
Language: C

#include<stdio.h>

int main(){
  int n,a[1000];
  int v;
  int i,j,k;

  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%d",&a[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[j+1]=v;
    for(k=0;k<n;k++){
      printf("%d",a[k]);
      if(k<n-1)
	prinf(" ");
    }
    printf("\n");
  }

  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:9: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   23 |         prinf(" ");
      |         ^~~~~
      |         printf
Language: C

include<stdio.h>

void insertionSort(int A[], int n){
	int i,j,k;
	int 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(k=0;k<n-1;k++) printf("%d ",A[k]);
		printf("%d",A[k]);
		printf("\n");
	}
}

int main(void)
{
	int N;
	scanf("%d",&N);
	int Num[N];
	int i;
	for(i=0;i<N;i++) scanf("%d",&Num[i]);
	for(i=0;i<N-1;i++) printf("%d ",Num[i]);
    printf("%d",Num[i]);
	printf("\n");
	insertionSort(Num,N);
	return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:23:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   23 |         scanf("%d",&N);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:23:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   23 |         scanf("%d",&N);
      |         ^~~~~
main.c:23:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:27:28: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   27 |         for(i=0;i<N-1;i++) printf("%d ",Num[i]);
      |                            ^~~~~~
main.c:27:28: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:27:28: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:27:28: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   28 |     printf("%d",Num[i]);
      |     ^~~~~~
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:30:9: error: implicit declaration of function 'insertionSort' [-Wimplicit-function-declaration]
   30 |         insertionSort(Num,N);
      |         ^~~~~~~~~~~~~
Language: C

#include <iostream>
using namespace std;

void sort(int* num, int n);
void output(int* num, int n);

int main(){
  int n;
  cin >> n;
  int* num;
  num = new int[n];
  for(int i = 0; i < n; i++) cin >> num[i];
  sort(num, n);
  output(num, n);
  delete[] num;
  return 0;
}

void sort(int* num, int n){
  for(int i = 1; i <= n - 1; i++){
    output(num, n);
    int v = num[i];
    int j = i - 1;
    while(j >= 0 && num[j] > v){
      num[j + 1] = num[j];
      j--;
    }
    num[j + 1] = v;
  }
}

void output(int* num, int n){
  for(int i = 0; i < n; i++) cout << num[i] << " ";
  cout << endl;
}

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

#include <stdint.h>
#include <algorithm>
#include <bitset>
#include <functional>
#include <iostream>
#include <string>
#include <vector>

int main(int argc, char *argv[]) {
  int N;

  std::cin >> N;

  int nums[N];

  for (int i = 0; i < N; i++) {
    std::cin >> nums[i];
  }

  int swapCount = 0;
  for (int i = 0; i < N - 1; i++) {
    int minIndex = i + 1;
    for (int k = i + 2; k < N; k++) {
      if (nums[minIndex] > nums[k]) {
        minIndex = k;
      }
    }
    if (nums[i] > nums[minIndex]) {
      int v = nums[minIndex];
      nums[minIndex] = nums[i];
      nums[i] = v;
      swapCount++;
    }
  }
  for (int i = 0; i < N; i++) {
    if (i) std::cout << " ";
    std::cout << nums[i];
  }
  std::cout << std::endl;
  std::cout << swapCount << std::endl;

  return 0;
}

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

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

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

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

    v = A[i];
    j = i - 1;
    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:19:5: error: 'v' undeclared (first use in this function)
   19 |     v = A[i];
      |     ^
main.c:19:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
  int N,i,j,k,x;
  int A[100];
  scanf("%d",&N);

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

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

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

#include <stdio.h>

void main( unsigned short* Array, unsigned char Num )
{
   unsigned char i = 0;
   unsigned char j = 0;

   unsigned short v = 0;
   
   for( i = 1; i < Num; i++; )
   {
         v = Array[i];
         j = i - 1;
     
         while( j >= 0 && Array[j] > v )
         {
             Array[j+1] = Array[j];
             j--;
             Array[j+1] = v;
             
             puts("%u",Array[j]);
         }
    }
    
    return;
}

Compiler output:
main.c: In function 'main':
main.c:10:28: error: expected ')' before ';' token
   10 |    for( i = 1; i < Num; i++; )
      |       ~                    ^
      |                            )
main.c:21:14: error: too many arguments to function 'puts'
   21 |              puts("%u",Array[j]);
      |              ^~~~
In file included from main.c:1:
/usr/include/stdio.h:714:12: note: declared here
  714 | extern int puts (const char *__s);
      |            ^~~~