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

#include<stdio.h>

struct tree{
 int back, left, right;
};

struct tree a[25];

void preorder(int id){
 if (id == -1){
 return;  
 }
 printf(" %d", id);
 preorder(a[id].left);
 preorder(a[id].right);
}

void inorder(int id){
 if (id == -1){
 return;  
 }
 inorder(a[id].left);
 printf(" %d", id);
 inorder(a[id].right);
}

void postorder(int id){
 if (id == -1){
 return;  
 }
 postorder(a[id].left);
 postorder(a[id].right);
 printf(" %d", id);
}

int main(){
 int num, i, Start, point, left, right;
 
 scanf("%d", &num);
 for(i = 0; i < num; i++){
   a[i].back = -1;
 }

 for(i = 0; i < num; i++){
   scanf("%d %d %d", &point ,&left, &right);
   a[point].left  = left;
   a[point].right = right;
   if(left != -1){
     a[left].back  = point;
   }
   if(right != -1){
     a[right].back = point;
   }
 }
 
 for(i = 0; i < num; i++){
    /* check
    printf("%d %d %d %d\n",i, a[i].back,a[i].left,a[i].right);
    */
   if(a[i].back == -1){
     Start = i;
   }
 }

 printf("Preorder\n");
 preorder(Start);
 printf("\n");

 printf("
Inorder\n");
 inorder(Start);
 printf("\n");

 printf("
Postorder\n");
 postorder(Start);
 printf("\n");

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:69:9: warning: missing terminating " character
   69 |  printf("
      |         ^
main.c:69:9: error: missing terminating " character
main.c:70:8: error: stray '\' in program
   70 | Inorder\n");
      |        ^
main.c:70:1: error: 'Inorder' undeclared (first use in this function); did you mean 'inorder'?
   70 | Inorder\n");
      | ^~~~~~~
      | inorder
main.c:70:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:70:8: error: expected ')' before 'n'
   70 | Inorder\n");
      |        ^~
      |        )
main.c:69:8: note: to match this '('
   69 |  printf("
      |        ^
main.c:70:10: warning: missing terminating " character
   70 | Inorder\n");
      |          ^
main.c:70:10: error: missing terminating " character
   70 | Inorder\n");
      |          ^~~
main.c:74:9: warning: missing terminating " character
   74 |  printf("
      |         ^
main.c:74:9: error: missing terminating " character
main.c:75:10: error: stray '\' in program
   75 | Postorder\n");
      |          ^
main.c:75:12: warning: missing terminating " character
   75 | Postorder\n");
      |            ^
main.c:75:12: error: missing terminating " character
   75 | Postorder\n");
      |            ^~~
main.c:80:1: error: expected declaration or statement at end of input
   80 | }
      | ^
Language: C

#include<stdio.h>
#define MAX 10000
#define NALL

struct tree { int p, l, r;};
struct tree T[MAX];
int n;

void Preorder ( int u ) {
    if ( u == NALL ) return;
    printf(" %d", u);
    Preorder(T[u].l);
    Preorder(T[u].r);
}

void Inorder ( int u ) {
    if ( u == NALL ) return;
    Inorder(T[u].l);
    printf(" %d", u);
    Inorder(T[u].r);
}

void Postorder ( int u ) {
    if ( u == NALL ) return;
    Postorder(T[u].l);
    Postorder(T[u].r);
    printf(" %d", u);
}

int main(void) {
    int i, v, l, r, f, root;
    scanf("%d", &n);
    for ( i = 0; i < n; i++ ) {
        T[i].p = NALL;
    }

    for ( i = 0; i < n; i++ ) {
        scanf("%d %d %d", &v, &l, &r);
        T[v].l = l;
        T[v].r = r;
        if ( l != NALL ) T[l].p = v;
        if ( r != NALL ) T[r].p = v;
    }

    for ( i = 0; i < n; i++ ) {
        if ( T[i].p == NALL ) root = 1;
    }

    printf("Preorder\n");
    Preorder(root);
    printf("\nInorder\n");
    Inorder(root);
    printf("\nPostoder\n");
    Postoder(root);
    printf("\n");

    return 0;

}

Compiler output:
main.c: In function 'Preorder':
main.c:10:20: error: expected expression before ')' token
   10 |     if ( u == NALL ) return;
      |                    ^
main.c: In function 'Inorder':
main.c:17:20: error: expected expression before ')' token
   17 |     if ( u == NALL ) return;
      |                    ^
main.c: In function 'Postorder':
main.c:24:20: error: expected expression before ')' token
   24 |     if ( u == NALL ) return;
      |                    ^
main.c: In function 'main':
main.c:34:22: error: expected expression before ';' token
   34 |         T[i].p = NALL;
      |                      ^
main.c:41:24: error: expected expression before ')' token
   41 |         if ( l != NALL ) T[l].p = v;
      |                        ^
main.c:42:24: error: expected expression before ')' token
   42 |         if ( r != NALL ) T[r].p = v;
      |                        ^
main.c:46:29: error: expected expression before ')' token
   46 |         if ( T[i].p == NALL ) root = 1;
      |                             ^
main.c:54:5: error: implicit declaration of function 'Postoder'; did you mean 'Postorder'? [-Wimplicit-function-declaration]
   54 |     Postoder(root);
      |     ^~~~~~~~
      |     Postorder
Language: C

#include<stdio.h>
#define MAX 10000

struct node { int p, l, r };
struct node T[MAX];
int n;

void preparse(int u) {
   if (u == NIL) return;
   printf(" %d", u);
   preparse(T[u].l);
   preparse(T[u].r);
}

void inparse(int u) {
   if (u == NIL) return;
   inparse(T[u].l);
   printf(" %d", u);
   inparse(T[u].r);
}

void postparse(int u) {
   if (u == NIL) return;
   postparse(T[u].l);
   postparse(T[u].r);
   printf(" %d", u);
}

int main() {
   int i, v, l, r, root;

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

   for (i = 0; i < n; i++) {
      scanf("%d %d %d", &v, &l, &r);

      T[v].l = l;
      T[v].r = r;

      if (l != NIL) T[l].p = v;
      if (l != NIL) T[r].p = v;
   }

   for ( i = 0; i < n; i++ )
      if ( T[i].p == NIL ) 
         root = i;

   printf("Preorder\n");
   preparse(root);
   printf("\n");

   printf("Inorder\n");
   inparse(root);
   printf("\n");

   printf("Postorder\n");
   postparse(root);
   printf("\n");

   return 0;
}

Compiler output:
main.c:4:27: warning: no semicolon at end of struct or union
    4 | struct node { int p, l, r };
      |                           ^
main.c: In function 'preparse':
main.c:9:13: error: 'NIL' undeclared (first use in this function)
    9 |    if (u == NIL) return;
      |             ^~~
main.c:9:13: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'inparse':
main.c:16:13: error: 'NIL' undeclared (first use in this function)
   16 |    if (u == NIL) return;
      |             ^~~
main.c: In function 'postparse':
main.c:23:13: error: 'NIL' undeclared (first use in this function)
   23 |    if (u == NIL) return;
      |             ^~~
main.c: In function 'main':
main.c:34:13: error: 'NIL' undeclared (first use in this function)
   34 |    T[i].p = NIL;
      |             ^~~
Language: C

#include<stdio.h>
#define MAX 10000
#define NIL -1

struct Node {int p, l, r;};
struct Node T[MAX];
int n;

void preParse(int u){
  if (u==NIL)
    return 0;
  printf(" %d", u);
  preParse(T[u].l);
  preParse(T[u].r);
}

void inParse(int u){
  if (u==NIL)
    return 0;
  inParse(T[u].l);
  printf(" %d", u);
  inParse(T[u].r);
}

void postParse(int u){
  if (u==NIL)
    return 0;
  postParse(T[u].l);
  postParse(T[u].r);
  printf(" %d", u);
}

int main(){
  int i, v, l, r, root;

  scanf("%d", &n);
  for (i=0; i<n; i++)
    T[i].p = NIL;

  for (i=; i<n; i++) {
    scanf("%d %d %d", &v, &l, &r);
    T[v].l = l;
    T[v].r = r;
    if (l != NIL)
      T[l].p = v;
    if (r != NIL)
      T[r].p = v;
  }

  for (i=0; i<n; i++) {
    if (T[i].p == NIL)
      root = i;
  }

  printf("Preorder\n");
  preParse(root);
  printf("Inorder\n");
  inParse(root);
  printf("Postorder\n");
  postParse(root);
  printf("\n");

  return 0;
}

Compiler output:
main.c: In function 'preParse':
main.c:11:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   11 |     return 0;
      |            ^
main.c:9:6: note: declared here
    9 | void preParse(int u){
      |      ^~~~~~~~
main.c: In function 'inParse':
main.c:19:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   19 |     return 0;
      |            ^
main.c:17:6: note: declared here
   17 | void inParse(int u){
      |      ^~~~~~~
main.c: In function 'postParse':
main.c:27:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   27 |     return 0;
      |            ^
main.c:25:6: note: declared here
   25 | void postParse(int u){
      |      ^~~~~~~~~
main.c: In function 'main':
main.c:40:10: error: expected expression before ';' token
   40 |   for (i=; i<n; i++) {
      |          ^
Language: C

#include <stdio.h>
??
#define MAX 10000
#define NIL -1
??
struct Node { int p, l, r; };
struct Node T[MAX];
int n;
??
void preorder(int u)?? {
????if (u == NIL) 
????????return;
????printf (" %d", u);
????preorder(T[u].l);
????preorder(T[u].r);
}
??
void inorder(int u)?? {
????if (u == NIL)?? 
????????return;
????inorder(T[u].l);
????printf(" %d", u);
????inorder(T[u].r);
}
??
void postorder(int u)?? {
????if (u == NIL) 
????????return;
????postorder(T[u].l);
????postorder(T[u].r);
????printf(" %d", u);
}
??
int main(void)?? {
????int i, v, l, r, root;
??????
????scanf("%d", &n);
????for (i = 0; i < n; i++)?? {
????????T[i].p = NIL;
????}
????
????for (i = 0; i < n; i++)?? {
????????scanf("%d %d %d", &v, &l, &r);
????????T[v].l = l;
????????T[v].r = r;
????????if ( l != NIL)
????????????T[l].p = v;
????????if (r != NIL)
????????????T[r].p = v;
????????}
??
????for ( i = 0; i < n; i++)?? 
????????if ( T[i].p == NIL)
????????????root = i;
????????printf("Preorder\n");
????????preorder(root);
????????printf("\nInorder\n");
????????inorder(root);
????????printf("\nPreorder\n");
????????preorder(root);
????????printf("\n");
??
????return 0;
}
????

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
main.c:7:13: error: array type has incomplete element type 'struct Node'
    7 | struct Node T[MAX];
      |             ^
main.c:9:1: error: expected identifier or '(' before '?' token
    9 | ??
      | ^
main.c:17:1: error: expected identifier or '(' before '?' token
   17 | ??
      | ^
main.c:25:1: error: expected identifier or '(' before '?' token
   25 | ??
      | ^
main.c:33:1: error: expected identifier or '(' before '?' token
   33 | ??
      | ^
main.c:65:1: error: expected identifier or '(' before '?' token
   65 | ????
      | ^
Language: C

#include<stdio.h>
#define Max 10000
#define NIL -1

struct Node{int p, l, r; };
struct Node T[MAX];
int n;

int Preparse(int u){
  if(u == NIL) return;
  printf(" %d", &u);
  Preparse(T[u].l);
  Preparse(T[u].r);
}

int inParse(int u){
  if(u == NIL) return;
  printf(" %d", u);
  inParse(T[u].l);
  inParse(T[u].r);
}

int postParse(int u){
  if(u == NIL) return;
  printf(" %d", u);
  postParse(T[u].l);
  postParse(T[u].r);
}

int main()
{
  int i, v, l, r, root;
  
  scanf("%d", &n);
  for(i = 0; i < n; i++){
    T[i].p = NIL;
  }
  for(i = 0; i < n; i++){
    scanf("%d %d %d", &v, &l, &r);
    T[v].l = l;
    T[v].r = r;
    if (l != NIL) T[l].p = v;
    if (r !- NIL) T[r].p = v;
  }
  
  for (i = 0; i < n; i++) if(T[i].p == NIL) root = i;

  printf("Preorder\n");
  Preparse(root);
  printf("inParse\n");
  inParse(root);
  printf("Postorder");
  postParse(root);
}
 

Compiler output:
main.c:6:15: error: 'MAX' undeclared here (not in a function); did you mean 'Max'?
    6 | struct Node T[MAX];
      |               ^~~
      |               Max
main.c: In function 'Preparse':
main.c:10:16: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   10 |   if(u == NIL) return;
      |                ^~~~~~
main.c:9:5: note: declared here
    9 | int Preparse(int u){
      |     ^~~~~~~~
main.c: In function 'inParse':
main.c:17:16: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   17 |   if(u == NIL) return;
      |                ^~~~~~
main.c:16:5: note: declared here
   16 | int inParse(int u){
      |     ^~~~~~~
main.c: In function 'postParse':
main.c:24:16: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   24 |   if(u == NIL) return;
      |                ^~~~~~
main.c:23:5: note: declared here
   23 | int postParse(int u){
      |     ^~~~~~~~~
main.c: In function 'main':
main.c:43:10: error: expected ')' before '!' token
   43 |     if (r !- NIL) T[r].p = v;
      |        ~ ^~
      |          )
Language: C

#include<stdio.h>
#define MAX 10000
#define NIL -1

struct Node{int p, l, r; };
struct Node T[MAX];
int n;

int Preparse(int u){
  if(u == NIL) return;
  printf(" %d", &u);
  Preparse(T[u].l);
  Preparse(T[u].r);
}

int inParse(int u){
  if(u == NIL) return;
  printf(" %d", u);
  inParse(T[u].l);
  inParse(T[u].r);
}

int postParse(int u){
  if(u == NIL) return;
  printf(" %d", u);
  postParse(T[u].l);
  postParse(T[u].r);
}

int main()
{
  int i, v, l, r, root;
  
  scanf("%d", &n);
  for(i = 0; i < n; i++){
    T[i].p = NIL;
  }
  for(i = 0; i < n; i++){
    scanf("%d %d %d", &v, &l, &r);
    T[v].l = l;
    T[v].r = r;
    if (l != NIL) T[l].p = v;
    if (r !- NIL) T[r].p = v;
  }
  
  for (i = 0; i < n; i++) if(T[i].p == NIL) root = i;

  printf("Preorder\n");
  Preparse(root);
  printf("inParse\n");
  inParse(root);
  printf("Postorder");
  postParse(root);
}
 

Compiler output:
main.c: In function 'Preparse':
main.c:10:16: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   10 |   if(u == NIL) return;
      |                ^~~~~~
main.c:9:5: note: declared here
    9 | int Preparse(int u){
      |     ^~~~~~~~
main.c: In function 'inParse':
main.c:17:16: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   17 |   if(u == NIL) return;
      |                ^~~~~~
main.c:16:5: note: declared here
   16 | int inParse(int u){
      |     ^~~~~~~
main.c: In function 'postParse':
main.c:24:16: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   24 |   if(u == NIL) return;
      |                ^~~~~~
main.c:23:5: note: declared here
   23 | int postParse(int u){
      |     ^~~~~~~~~
main.c: In function 'main':
main.c:43:10: error: expected ')' before '!' token
   43 |     if (r !- NIL) T[r].p = v;
      |        ~ ^~
      |          )
Language: C

#include<stdio.h>
#define MAX 10000
#define NIL -1

struct Node{int p, l, r; };
struct Node T[MAX];
int n;

vod Preparse(int u){
  if(u == NIL) return;
  printf(" %d", &u);
  Preparse(T[u].l);
  Preparse(T[u].r);
}

void inParse(int u){
  if(u == NIL) return;
  inParse(T[u].l);
  printf(" %d", u);
  inParse(T[u].r);
}

void postParse(int u){
  if(u == NIL) return;
  postParse(T[u].l);
  postParse(T[u].r);
  printf(" %d", u);
}

int main()
{
  int i, v, l, r, root;
  
  scanf("%d", &n);
  for(i = 0; i < n; i++){
    T[i].p = NIL;
  }
  for(i = 0; i < n; i++){
    scanf("%d %d %d", &v, &l, &r);
    T[v].l = l;
    T[v].r = r;
    if (l != NIL) T[l].p = v;
    if (r != NIL) T[r].p = v;
  }
  
  for (i = 0; i < n; i++) if(T[i].p == NIL) root = i;

  printf("Preorder\n");
  Preparse(root);
  printf("\n");
  printf("Inorder\n");
  inParse(root);
  printf("\n");
  printf("Postorder");
  postParse(root);
  printf("\n");

 return 0;
}
 

Compiler output:
main.c:9:1: error: unknown type name 'vod'; did you mean 'void'?
    9 | vod Preparse(int u){
      | ^~~
      | void
main.c: In function 'Preparse':
main.c:10:16: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   10 |   if(u == NIL) return;
      |                ^~~~~~
main.c:9:5: note: declared here
    9 | vod Preparse(int u){
      |     ^~~~~~~~
Language: C

#include<stdio.h>

struct Node {int p, l, r;};
struct Node T[10000];
int n;

void preParse(int u){
  if(u == -1) return;
  printf(" %d", u);
  preParse(T[u].l);
  preParse(T[u].r);
}

void inParse(int u){
  if(u == -1) return;
  inParse(T[u].l);
  printf(" %d", u);
  inParse(T[u].r);
}

void Parse(int u){
  if(u == -1) return;
  postParse(T[u].l);
  postParse(T[u].r);
  printf(" %d", u);
}

int main(){

  int i, v, l, r, root;

  scanf("%d", &n);

  for(i = 0; i < n; i++){
    T[i].p = -1;
  }

  for(i = 0; i < n; i++){
    scanf("%d %d %d", &v, &l, &r);
    T[v].l = l;
    T[v].r = r;
    if( l != -1 ) t[l].p = v;
    if( r != -1 ) t[r].p = v;
  }

  for(i = 0; i < n; i++) if ( T[I].p == -1) root = 1;

  printf("Preorder\n");
  preParse(root);
  printf("\n");

  printf("Inorder\n");
  inParse(root);
  printf("\n");

  printf("Postorder\n");
  postParse(root);
  printf("\n");

return 0;
}

Compiler output:
main.c: In function 'Parse':
main.c:23:3: error: implicit declaration of function 'postParse'; did you mean 'preParse'? [-Wimplicit-function-declaration]
   23 |   postParse(T[u].l);
      |   ^~~~~~~~~
      |   preParse
main.c: In function 'main':
main.c:42:19: error: 't' undeclared (first use in this function)
   42 |     if( l != -1 ) t[l].p = v;
      |                   ^
main.c:42:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:46:33: error: 'I' undeclared (first use in this function)
   46 |   for(i = 0; i < n; i++) if ( T[I].p == -1) root = 1;
      |                                 ^
Language: C

#include<stdio.h>

struct Node {int p, l, r;};
struct Node T[10000];
int n;

void preParse(int u){
  if(u == -1) return;
  printf(" %d", u);
  preParse(T[u].l);
  preParse(T[u].r);
}

void inParse(int u){
  if(u == -1) return;
  inParse(T[u].l);
  printf(" %d", u);
  inParse(T[u].r);
}

void Parse(int u){
  if(u == -1) return;
  postParse(T[u].l);
  postParse(T[u].r);
  printf(" %d", u);
}

int main(){

  int i, v, l, r, root;

  scanf("%d", &n);

  for(i = 0; i < n; i++){
    T[i].p = -1;
  }

  for(i = 0; i < n; i++){
    scanf("%d %d %d", &v, &l, &r);
    T[v].l = l;
    T[v].r = r;
    if( l != -1 ) T[l].p = v;
    if( r != -1 ) T[r].p = v;
  }

  for(i = 0; i < n; i++) if ( T[i].p == -1) root = 1;

  printf("Preorder\n");
  preParse(root);
  printf("\n");

  printf("Inorder\n");
  inParse(root);
  printf("\n");

  printf("Postorder\n");
  postParse(root);
  printf("\n");

return 0;
}

Compiler output:
main.c: In function 'Parse':
main.c:23:3: error: implicit declaration of function 'postParse'; did you mean 'preParse'? [-Wimplicit-function-declaration]
   23 |   postParse(T[u].l);
      |   ^~~~~~~~~
      |   preParse
Language: C

#include <stdio.h>

struct A { int a, b, c; };
struct A T[10000];
int n;

void preParse(int u)
{
   if ( u == -1 ) {
      return;
   }
   printf(" %d", u);
   preParse( T[ u ].b );
   preParse( T[ u ].c );
}

void inParse(int u)
{
   if ( u == -1 ) {
      return;
   }
   inParse( T[ u ].b );
   printf(" %d", u);
   inParse( T[ u ].c );
}

voidpostParse(int u)
{
   if ( u == -1 ) {
      return;
   }
   postParse( T[ u ].b );
   postParse( T[ u ].c );
   printf(" %d", u);
}

int main()
{
   int i, k, b, c, rooy;

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

   for ( i = 0; i < n; i++ ) {
      scanf("%d %d %d", &k, &b, &c);
      T[ k ].b = b;
      T[ k ].c = c;
      if ( b != -1 ) {
         T[ b ].a = k;
      }
      if ( c != -1 ) {
         T[ c ].a = k;
      }
   }

   for ( i = 0; i < n; i++ ) {
      if ( T[ i ].a == -1 ) {
         root =i;
      }
   }

   printf("Preorder\n");
   preParse(root);
   printf("\n");
   printf("Inorder\n");
   inParse(root);
   printf("\n");
   printf("Postorder\n");
   postParse(root);
   printf("\n");

   return 0;
}

Compiler output:
main.c:27:1: error: return type defaults to 'int' [-Wimplicit-int]
   27 | voidpostParse(int u)
      | ^~~~~~~~~~~~~
main.c: In function 'voidpostParse':
main.c:30:7: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   30 |       return;
      |       ^~~~~~
main.c:27:1: note: declared here
   27 | voidpostParse(int u)
      | ^~~~~~~~~~~~~
main.c:32:4: error: implicit declaration of function 'postParse'; did you mean 'preParse'? [-Wimplicit-function-declaration]
   32 |    postParse( T[ u ].b );
      |    ^~~~~~~~~
      |    preParse
main.c: In function 'main':
main.c:60:10: error: 'root' undeclared (first use in this function); did you mean 'rooy'?
   60 |          root =i;
      |          ^~~~
      |          rooy
main.c:60:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

struct A { int a, b, c; };
struct A T[10000];
int n;

void preParse(int u)
{
   if ( u == -1 ) {
      return;
   }
   printf(" %d", u);
   preParse( T[ u ].b );
   preParse( T[ u ].c );
}

void inParse(int u)
{
   if ( u == -1 ) {
      return;
   }
   inParse( T[ u ].b );
   printf(" %d", u);
   inParse( T[ u ].c );
}

voidpostParse(int u)
{
   if ( u == -1 ) {
      return;
   }
   postParse( T[ u ].b );
   postParse( T[ u ].c );
   printf(" %d", u);
}

int main()
{
   int i, k, b, c, root;

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

   for ( i = 0; i < n; i++ ) {
      scanf("%d %d %d", &k, &b, &c);
      T[ k ].b = b;
      T[ k ].c = c;
      if ( b != -1 ) {
         T[ b ].a = k;
      }
      if ( c != -1 ) {
         T[ c ].a = k;
      }
   }

   for ( i = 0; i < n; i++ ) {
      if ( T[ i ].a == -1 ) {
         root =i;
      }
   }

   printf("Preorder\n");
   preParse(root);
   printf("\n");
   printf("Inorder\n");
   inParse(root);
   printf("\n");
   printf("Postorder\n");
   postParse(root);
   printf("\n");

   return 0;
}

Compiler output:
main.c:27:1: error: return type defaults to 'int' [-Wimplicit-int]
   27 | voidpostParse(int u)
      | ^~~~~~~~~~~~~
main.c: In function 'voidpostParse':
main.c:30:7: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   30 |       return;
      |       ^~~~~~
main.c:27:1: note: declared here
   27 | voidpostParse(int u)
      | ^~~~~~~~~~~~~
main.c:32:4: error: implicit declaration of function 'postParse'; did you mean 'preParse'? [-Wimplicit-function-declaration]
   32 |    postParse( T[ u ].b );
      |    ^~~~~~~~~
      |    preParse
Language: C

#include <stdio.h>

struct tree{
 int id;
 int left;
 int right;
};

struct tree a[10000];

void inparse(int m)
{
 if(m==-1) return;
 inparse(a[m].left);
 printf(" %d",m);
 inparse(a[m].right);
}

void preparse(int m)
{
 if(m==-1) rertun;
 printf(" %d",m);
 preparse(a[m].left);
 preparse(a[m].right);
}

void postparse(int m)
{
 if(m==-1) return;
 postparse(a[m].left);
 postparse(a[m].right);
 printf(" %d",m);
}

int main(void)
{
 int i,n,m,left,right,id;

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

 for(i=0;i<n;i++){
  scanf("%d %d %d",&m,&left,&right);
  a[m].left=left;
  a[m].right=right;
  if(left!=-1) a[left].id=m;
  if(right!=-1) a[right].id=m;
 }

 for(i=0;i<n;i++){
   if(a[i].id==-1) id==i;
 }

 printf("Preorder\n");
 preparse(id);
 printf("\nInorder\n");
 inparse(id);
 printf("\nPostorder\n");
 postparse(id);
 printf("\n");

 return 0;
}

Compiler output:
main.c: In function 'preparse':
main.c:21:12: error: 'rertun' undeclared (first use in this function)
   21 |  if(m==-1) rertun;
      |            ^~~~~~
main.c:21:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
??
struct tree{
??int id;
??int left;
??int right;
};
??
struct tree a[10000];
??
void inparse(int m)
{
??if(m==-1) return;
??inparse(a[m].left);
??printf(" %d",m);
??inparse(a[m].right);
}
??
void preparse(int m)
{
??if(m==-1) return;
??printf(" %d",m);
??preparse(a[m].left);
??preparse(a[m].right);
}
??
void postparse(int m)
{
??if(m==-1) return;
??postparse(a[m].left);
??postparse(a[m].right);
??printf(" %d",m);
}
??
int main(void)
{
??int i,n,m,left,right,id;
??
??scanf("%d",&n);
??for(i=0;i<n;i++){
????a[i].id=-1;
??}
??
??for(i=0;i<n;i++){
????scanf("%d %d %d",&m,&left,&right);
????a[m].left=left;
????a[m].right=right;
????if(left!=-1) a[left].id=m;
????if(right!=-1) a[right].id=m;
??}
??
??for(i=0;i<n;i++){
??????if(a[i].id==-1) id==i;
??}
??
??printf("Preorder\n");
??preparse(id);
??printf("\nInorder\n");
??inparse(id);
??printf("\nPostorder\n");
??postparse(id);
??printf("\n");
??
??return 0;
}

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

#include <stdio.h>
??
struct tree{
??int id;
??int left;
??int right;
};
??
struct tree a[10000];
??
void inparse(int m)
{
??if(m==-1) return;
??inparse(a[m].left);
??printf(" %d",m);
??inparse(a[m].right);
}
??
void preparse(int m)
{
??if(m==-1) return;
??printf(" %d",m);
??preparse(a[m].left);
??preparse(a[m].right);
}
??
void postparse(int m)
{
??if(m==-1) return;
??postparse(a[m].left);
??postparse(a[m].right);
??printf(" %d",m);
}
??
int main(int argc,char const *argv[])
{
??int i,n,m,left,right,id;
??
??scanf("%d",&n);
??for(i=0;i<n;i++){
????a[i].id=-1;
??}
??
??for(i=0;i<n;i++){
????scanf("%d %d %d",&m,&left,&right);
????a[m].left=left;
????a[m].right=right;
????if(left!=-1) a[left].id=m;
????if(right!=-1) a[right].id=m;
??}
??
??for(i=0;i<n;i++){
??????if(a[i].id==-1) id==i;
??}
??
??printf("Preorder\n");
??preparse(id);
??printf("\nInorder\n");
??inparse(id);
??printf("\nPostorder\n");
??postparse(id);
??printf("\n");
??
??return 0;
}

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

#include <stdio.h>
??
struct tree{
??int id,left,right;
};
??
struct tree a[10000];
??
void inparse(int m)
{
??if(m==-1) return;
??inparse(a[m].left);
??printf(" %d",m);
??inparse(a[m].right);
}
??
void preparse(int m)
{
??if(m==-1) return;
??printf(" %d",m);
??preparse(a[m].left);
??preparse(a[m].right);
}
??
void postparse(int m)
{
??if(m==-1) return;
??postparse(a[m].left);
??postparse(a[m].right);
??printf(" %d",m);
}
??
int main(int argc,char const *argv[])
{
??int i,n,m,left,right,id;
??
??scanf("%d",&n);
??for(i=0;i<n;i++){
????a[i].id=-1;
??}
??
??for(i=0;i<n;i++){
????scanf("%d %d %d",&m,&left,&right);
????a[m].left=left;
????a[m].right=right;
????if(left!=-1) a[left].id=m;
????if(right!=-1) a[right].id=m;
??}
??
??for(i=0;i<n;i++){
??????if(a[i].id==-1) id==i;
??}
??
??printf("Preorder\n");
??preparse(id);
??printf("\nInorder\n");
??inparse(id);
??printf("\nPostorder\n");
??postparse(id);
??printf("\n");
??
??return 0;
}

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

#include <stdio.h>
??
struct tree{
 int id,left,right;
};
??
struct tree a[10000];
??
void inparse(int m)
{
 if(m==-1) return;
??inparse(a[m].left);
??printf(" %d",m);
??inparse(a[m].right);
}
??
void preparse(int m)
{
??if(m==-1) return;
??printf(" %d",m);
??preparse(a[m].left);
??preparse(a[m].right);
}
??
void postparse(int m)
{
??if(m==-1) return;
??postparse(a[m].left);
??postparse(a[m].right);
??printf(" %d",m);
}
??
int main(int argc,char const *argv[])
{
??int i,n,m,left,right,id;
??
??scanf("%d",&n);
??for(i=0;i<n;i++){
????a[i].id=-1;
??}
??
??for(i=0;i<n;i++){
????scanf("%d %d %d",&m,&left,&right);
????a[m].left=left;
????a[m].right=right;
????if(left!=-1) a[left].id=m;
????if(right!=-1) a[right].id=m;
??}
??
??for(i=0;i<n;i++){
??????if(a[i].id==-1) id==i;
??}
??
??printf("Preorder\n");
??preparse(id);
??printf("\nInorder\n");
??inparse(id);
??printf("\nPostorder\n");
??postparse(id);
??printf("\n");
??
??return 0;
}

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

#include <stdio.h>
??
struct tree{
 int id,left,right;
};
??
struct tree a[10000];
??
void inparse(int m)
{
 if(m==-1) return;
 inparse(a[m].left);
 printf(" %d",m);
 inparse(a[m].right);
}
??
void preparse(int m)
{
 if(m==-1) return;
 printf(" %d",m);
 preparse(a[m].left);
 preparse(a[m].right);
}
??
void postparse(int m)
{
??if(m==-1) return;
??postparse(a[m].left);
??postparse(a[m].right);
??printf(" %d",m);
}
??
int main(int argc,char const *argv[])
{
??int i,n,m,left,right,id;
??
??scanf("%d",&n);
??for(i=0;i<n;i++){
????a[i].id=-1;
??}
??
??for(i=0;i<n;i++){
????scanf("%d %d %d",&m,&left,&right);
????a[m].left=left;
????a[m].right=right;
????if(left!=-1) a[left].id=m;
????if(right!=-1) a[right].id=m;
??}
??
??for(i=0;i<n;i++){
??????if(a[i].id==-1) id==i;
??}
??
??printf("Preorder\n");
??preparse(id);
??printf("\nInorder\n");
??inparse(id);
??printf("\nPostorder\n");
??postparse(id);
??printf("\n");
??
??return 0;
}

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

#include <stdio.h>

struct tree{
 int id,left,right;
};

struct tree a[10000];

void inparse(int m)
{
 if(m==-1) return;
 inparse(a[m].left);
 printf(" %d",m);
 inparse(a[m].right);
}

void preparse(int m)
{
 if(m==-1) return;
 printf(" %d",m);
 preparse(a[m].left);
 preparse(a[m].right);
}

void postparse(int m)
{
??if(m==-1) return;
??postparse(a[m].left);
??postparse(a[m].right);
??printf(" %d",m);
}

int main(int argc,char const *argv[])
{
??int i,n,m,left,right,id;

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

??for(i=0;i<n;i++){
????scanf("%d %d %d",&m,&left,&right);
????a[m].left=left;
????a[m].right=right;
????if(left!=-1) a[left].id=m;
????if(right!=-1) a[right].id=m;
??}

??for(i=0;i<n;i++){
??????if(a[i].id==-1) id==i;
??}

??printf("Preorder\n");
??preparse(id);
??printf("\nInorder\n");
??inparse(id);
??printf("\nPostorder\n");
??postparse(id);
??printf("\n");

??return 0;
}

Compiler output:
main.c: In function 'postparse':
main.c:27:1: error: expected expression before '?' token
   27 | ??if(m==-1) return;
      | ^
main.c:28:1: error: expected expression before '?' token
   28 | ??postparse(a[m].left);
      | ^
main.c:29:1: error: expected expression before '?' token
   29 | ??postparse(a[m].right);
      | ^
main.c:30:1: error: expected expression before '?' token
   30 | ??printf(" %d",m);
      | ^
main.c: In function 'main':
main.c:35:1: error: expected expression before '?' token
   35 | ??int i,n,m,left,right,id;
      | ^
main.c:37:1: error: expected expression before '?' token
   37 | ??scanf("%d",&n);
      | ^
main.c:37:15: error: 'n' undeclared (first use in this function)
   37 | ??scanf("%d",&n);
      |               ^
main.c:37:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:38:1: error: expected expression before '?' token
   38 | ??for(i=0;i<n;i++){
      | ^
main.c:55:1: error: expected expression before '?' token
   55 | ??preparse(id);
      | ^
main.c:55:12: error: 'id' undeclared (first use in this function)
   55 | ??preparse(id);
      |            ^~
main.c:56:1: error: expected expression before '?' token
   56 | ??printf("\nInorder\n");
      | ^
main.c:57:1: error: expected expression before '?' token
   57 | ??inparse(id);
      | ^
main.c:58:1: error: expected expression before '?' token
   58 | ??printf("\nPostorder\n");
      | ^
main.c:59:1: error: expected expression before '?' token
   59 | ??postparse(id);
      | ^
main.c:60:1: error: expected expression before '?' token
   60 | ??printf("\n");
      | ^
main.c:62:1: error: expected expression before '?' token
   62 | ??return 0;
      | ^
Language: C

#include<stdio.h>

struct Node{int p,l,r;};
struct Node T[Max];
int n;

void preParse(int u){
  if ( u == -1 ) return;
  printf("%d",u);
  preParse(T[u].l);
  preParse(T[u].r);
}

void postParse(int u){
  if ( u == -1 ) return;
  inParse(T[u].l);
  printf("%d",u);
  inParse(T[u].r);
}

void postParse(int u){
  if ( u == -1 ) return;
  postParse(T[u].l);
  postParse(T[u].r);  
  printf("%d",u);
}

int main(){

  int i,v,l,r,root;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    T[i].p=-1;
  }

  for(i=0;i<n;i++){
    scanf("%d %d %d",&v,&l,&r);
    T[v].l=l;
    T[v].r=r;
    if(l!=-1) T[l].p=v;
    if(r!=-1) T[r].p=v;
  }

  for(i=0;i<n;i++){
    if(T[i].p==-1) root=i;
  }

  printf("Preorder\n");
  preParse(root);
  printf("\n");
  printf("Inorder\n");
  inParse(root);
  printf("\n");
  printf("Postorder\n");
  postParse(root);
  printf("\n");

  return 0;
}

Compiler output:
main.c:4:15: error: 'Max' undeclared here (not in a function)
    4 | struct Node T[Max];
      |               ^~~
main.c: In function 'postParse':
main.c:16:3: error: implicit declaration of function 'inParse' [-Wimplicit-function-declaration]
   16 |   inParse(T[u].l);
      |   ^~~~~~~
main.c: At top level:
main.c:21:6: error: redefinition of 'postParse'
   21 | void postParse(int u){
      |      ^~~~~~~~~
main.c:14:6: note: previous definition of 'postParse' with type 'void(int)'
   14 | void postParse(int u){
      |      ^~~~~~~~~
Language: C

#include<stdio.h>
??
struct Node{int p,l,r;};
struct Node T[10000];
int n;
??
void preParse(int u){
????if ( u == -1 ) return;
????printf("%d",u);
????preParse(T[u].l);
????preParse(T[u].r);
}
??
void postParse(int u){
????if ( u == -1 ) return;
????inParse(T[u].l);
????printf("%d",u);
????inParse(T[u].r);
}
??
void postParse(int u){
????if ( u == -1 ) return;
????postParse(T[u].l);
????postParse(T[u].r);?? 
????printf("%d",u);
}
??
int main(){
??
????int i,v,l,r,root;
??
????scanf("%d",&n);
????for(i=0;i<n;i++){
????????T[i].p=-1;
????}
??
????for(i=0;i<n;i++){
????????scanf("%d %d %d",&v,&l,&r);
????????T[v].l=l;
????????T[v].r=r;
????????if(l!=-1) T[l].p=v;
????????if(r!=-1) T[r].p=v;
????}
??
????for(i=0;i<n;i++){
????????if(T[i].p==-1) root=i;
????}
??
????printf("Preorder\n");
????preParse(root);
????printf("\n");
????printf("Inorder\n");
????inParse(root);
????printf("\n");
????printf("Postorder\n");
????postParse(root);
????printf("\n");
??
????return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
main.c:4:13: error: array type has incomplete element type 'struct Node'
    4 | struct Node T[10000];
      |             ^
main.c:6:1: error: expected identifier or '(' before '?' token
    6 | ??
      | ^
main.c:13:1: error: expected identifier or '(' before '?' token
   13 | ??
      | ^
main.c:20:1: error: expected identifier or '(' before '?' token
   20 | ??
      | ^
main.c:27:1: error: expected identifier or '(' before '?' token
   27 | ??
      | ^
Language: C

#include<stdio.h>
#define NIL -1??

struct Node {int p,l,r;};
struct Node T[10000];
int n;
??
void preParse(int u){
????if ( u == NIL ) return;
????printf("%d",u);
????preParse(T[u].l);
????preParse(T[u].r);
}
??
void postParse(int u){
????if ( u == NIL ) return;
????inParse(T[u].l);
????printf("%d",u);
????inParse(T[u].r);
}
??
void postParse(int u){
????if ( u == NIL ) return;
????postParse(T[u].l);
????postParse(T[u].r);?? 
????printf("%d",u);
}
??
int main(){
??
????int i,v,l,r,root;
??
????scanf("%d",&n);
????for(i=0;i<n;i++){
????????T[i].p=NIL;
????}
??
????for(i=0;i<n;i++){
????????scanf("%d %d %d",&v,&l,&r);
????????T[v].l=l;
????????T[v].r=r;
????????if(l!=NIL) T[l].p=v;
????????if(r!=NIL) T[r].p=v;
????}
??
????for(i=0;i<n;i++){
????????if(T[i].p==NIL) root=i;
????}
??
????printf("Preorder\n");
????preParse(root);
????printf("\n");
????printf("Inorder\n");
????inParse(root);
????printf("\n");
????printf("Postorder\n");
????postParse(root);
????printf("\n");
??
????return 0;
}

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

#include<stdio.h>
#define MAX 10000
#define NIL -1

struct Chain{
   int p, l, r;
};

struct Chain
   T[MAX];

int n;

void preParse(int u){
   if (u==NIL)
      return;
   printf(" %d", u);
   preParse(T[u].l);
   preParse(T[u].r);
}

void inParse(int u){
   if (u==NIL)
      return;
   inParse("T[u].l");
   printf(" %d", u);
   inParse("T[u].r");
}

void postParse(int u){
   if (u==NIL)
      return;
   postParse("T[u].l");
   postParse("T[u].r");
   printf(" %d", u);
}

int main()
{
   int i, id, l, r, root;

   scanf("%d", &n);
   for (i=0; i<n; i++)
      T[i].p = NIL;

   for (i=0; i<n; i++){
      scanf("%d %d %d", &v, &l, &r);
      T[v].l = l;
      T[v].r = r;
      if (l!=NIL)
         T[l].p = v;
      if (r!=NIL)
         T[r].p = v;
   }

   for (i=0; i<n; i++){
      if (T[i].p==NIL)
         root = i;
   }

   puts("Preorder");
   preParse(root);
   printf("\n");
   puts("Inorder");
   inParse(root);
   printf("\n");
   puts("Postorder");
   postParse(root);
   printf("\n");

   return 0;
}

Compiler output:
main.c: In function 'inParse':
main.c:25:12: error: passing argument 1 of 'inParse' makes integer from pointer without a cast [-Wint-conversion]
   25 |    inParse("T[u].l");
      |            ^~~~~~~~
      |            |
      |            char *
main.c:22:18: note: expected 'int' but argument is of type 'char *'
   22 | void inParse(int u){
      |              ~~~~^
main.c:27:12: error: passing argument 1 of 'inParse' makes integer from pointer without a cast [-Wint-conversion]
   27 |    inParse("T[u].r");
      |            ^~~~~~~~
      |            |
      |            char *
main.c:22:18: note: expected 'int' but argument is of type 'char *'
   22 | void inParse(int u){
      |              ~~~~^
main.c: In function 'postParse':
main.c:33:14: error: passing argument 1 of 'postParse' makes integer from pointer without a cast [-Wint-conversion]
   33 |    postParse("T[u].l");
      |              ^~~~~~~~
      |              |
      |              char *
main.c:30:20: note: expected 'int' but argument is of type 'char *'
   30 | void postParse(int u){
      |                ~~~~^
main.c:34:14: error: passing argument 1 of 'postParse' makes integer from pointer without a cast [-Wint-conversion]
   34 |    postParse("T[u].r");
      |              ^~~~~~~~
      |              |
      |              char *
main.c:30:20: note: expected 'int' but argument is of type 'char *'
   30 | void postParse(int u){
      |                ~~~~^
main.c: In function 'main':
main.c:47:26: error: 'v' undeclared (first use in this function)
   47 |       scanf("%d %d %d", &v, &l, &r);
      |                          ^
main.c:47:26: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

struct node { int o, p, q; };
struct node x[10000];
int n;

void pre( int u) {
	if ( u == -1) {
		return ;
	}
	printf(" %d", u);
	pre( x[u].l);
	pre( x[u].r);
	
}

void in( int u) {
	if ( u == -1) {
		return ;
	}
	in( x[u].l);
	printf(" %d", u);
	in( x[u].r);
	
}

void post( int u) {
	if ( u == -1){
		return ;
	}
	post( x[u].l);
	post( x[u].r);
	printf(" %d", u);
	
}

int main() {
	int i, v, l, r, way;
	
	scanf("%d", &n);
	for ( i = 0; i < n; i++) {
		x[i].p = -1;
	}
	
	for ( i = 0; i < n; i++) {
		scanf("%d %d %d", &v, &l, &r);
		x[v].l = l;
		x[v].r = r;
		if ( l != -1) {
			x[l].p = v;
		}
		if ( r != -1) {
			x[r].p = v;
		}
	}
	
	for ( i = 0; i < n; i++) {
		if ( x[i].p == -1) {
			way = i;
		}
	}
	printf("Preorder");
	pre(way);
	printf("\n");
	puts("Inorder");
	in(way);
	printf("\n");
	printf("Postorder");
	pos(way);
	printf("\n");
	
	return 0;
}

Compiler output:
main.c: In function 'pre':
main.c:12:18: error: 'struct node' has no member named 'l'
   12 |         pre( x[u].l);
      |                  ^
main.c:13:18: error: 'struct node' has no member named 'r'
   13 |         pre( x[u].r);
      |                  ^
main.c: In function 'in':
main.c:21:17: error: 'struct node' has no member named 'l'
   21 |         in( x[u].l);
      |                 ^
main.c:23:17: error: 'struct node' has no member named 'r'
   23 |         in( x[u].r);
      |                 ^
main.c: In function 'post':
main.c:31:19: error: 'struct node' has no member named 'l'
   31 |         post( x[u].l);
      |                   ^
main.c:32:19: error: 'struct node' has no member named 'r'
   32 |         post( x[u].r);
      |                   ^
main.c: In function 'main':
main.c:47:21: error: 'struct node' has no member named 'l'
   47 |                 x[v].l = l;
      |                     ^
main.c:48:21: error: 'struct node' has no member named 'r'
   48 |                 x[v].r = r;
      |                     ^
main.c:69:9: error: implicit declaration of function 'pos'; did you mean 'post'? [-Wimplicit-function-declaration]
   69 |         pos(way);
      |         ^~~
      |         post
Language: C

#include <stdio.h>

struct node { int o, p, q;};
struct node [10000];
int n;

void pre( int u) {
	if ( u == -1) {
		return ;
	}
	printf(" %d", u);
	pre( x[u].p);
	pre( x[u].q);
	
}

void in( int u) {
	if ( u == -1) {
		return ;
	}
	in( x[u].p);
	printf(" %d", u);
	in( x[u].q);
	
}

void post( int u) {
	if ( u == -1){
		return ;
	}
	post( x[u].p);
	post( x[u].q);
	printf(" %d", u);
	
}

int main() {
	int i, v, p, q, way;
	
	scanf("%d", &n);
	for ( i = 0; i < n; i++) {
		x[i].p = -1;
	}
	
	for ( i = 0; i < n; i++) {
		scanf("%d %d %d", &v, &p, &q);
		x[v].p = p;
		x[v].q = q;
		if ( p != -1) {
			x[p].o = v;
		}
		if ( q != -1) {
			x[q].o = v;
		}
	}
	
	for ( i = 0; i < n; i++) {
		if ( x[i].p == -1) {
			way = i;
		}
	}
	puts("Preorder");
	pre(way);
	puts("\n");
	puts("Inorder");
	in(way);
	puts("\n");
	puts("Postorder");
	pos(way);
	puts("\n");
	
	return 0;
}

Compiler output:
main.c:4:13: error: expected identifier or '(' before '[' token
    4 | struct node [10000];
      |             ^
main.c: In function 'pre':
main.c:12:14: error: 'x' undeclared (first use in this function)
   12 |         pre( x[u].p);
      |              ^
main.c:12:14: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'in':
main.c:21:13: error: 'x' undeclared (first use in this function)
   21 |         in( x[u].p);
      |             ^
main.c: In function 'post':
main.c:31:15: error: 'x' undeclared (first use in this function)
   31 |         post( x[u].p);
      |               ^
main.c: In function 'main':
main.c:42:17: error: 'x' undeclared (first use in this function)
   42 |                 x[i].p = -1;
      |                 ^
main.c:69:9: error: implicit declaration of function 'pos'; did you mean 'post'? [-Wimplicit-function-declaration]
   69 |         pos(way);
      |         ^~~
      |         post
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#define MAX 10000
#define NIL -1

struct Node { int p, l, r; };
struct Node T[MAX];
int n;

void preParse(int u) {
	if (u == NIL)return;
	printf("%d",　u);
	preParse(T[u].l);
	preParse(T[u].r);
}

void inParse(int u) {
	if (u == NIL)return;
	inParse(T[u].l);
	printf("%d",　u);
	inParse(T[u].r);
}

void postParse(int u) {
	if (u == NIL)return;
	postParse(T[u].l);
	postParse(T[u].r);
	printf("%d",　u);
}

int main() {
	int i, v, l, r, root;

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

	for (i = 0; i < n; i++) {
		scanf("%d %d %d ", &v, &l, &r);
		T[v].l = l;
		T[v].r = r;
		if (l != NIL)T[l].p = v;
		if (r != NIL)T[r].p = v;
	}

	for (i = 0; i < n; i++)if (T[i].p == NIL)root = i;

	printf("Preorder\n");
	preParse(root);
	printf("\n");
	printf("Inorder\n");
	inParse(root);
	printf("\n");
	printf("Postorder\n");
	postParse(root);
	printf("\n");

	return 0;
}


Compiler output:
main.c: In function 'preParse':
main.c:12:21: error: stray '\343' in program
   12 |         printf("%d",<U+3000>u);
      |                     ^~~~~~~~
main.c: In function 'inParse':
main.c:20:21: error: stray '\343' in program
   20 |         printf("%d",<U+3000>u);
      |                     ^~~~~~~~
main.c: In function 'postParse':
main.c:28:21: error: stray '\343' in program
   28 |         printf("%d",<U+3000>u);
      |                     ^~~~~~~~
Language: C

#include<stdio.h>
#define MAX 10000
#define NIL -1

struct Node{int p, l, r};
struct Node T[MAX];
int n;

void preParse(int u){
	if(u == NIL) return;
	printf(" %d",u);
	preParse(T[u].l);
	preParse(T[u].r);
}

void inParse(int u){
	if(u == NIL) return;
	inParse(T[u].l);
	printf(" %d",u);
	inParse(T[u].r);
}

void postParse(int u){
	if(u == NIL) return;
	postParse(T[u].l);
	postParse(T[u].r);
	printf(" %d",u);
}

int main(){
	int i,v,l,r,root;
	
	scanf("%d",&n);
	for(i = 0;i < n;i++){
		T[i].p = NIL;
	}
	
	for(i = 0;i < n;i++){
		scanf("%d %d %d",&v,&l,&r);
		T[v].l = l;
		T[v].r = r;
		if(l != NIL) T[l].p = v;
		if(r != NIL) T[r].p = v;
	}
	for(i = 0;i < n;i++) if(T[i].p == NIL) root = i;
	
	printf("Preorder\n");
	preParse(root);
	printf("\n");
	ptintf("Inorder\n");
	inParse(root);
	printf("\n");
	printf("Postorder\n");
	postPaese(root);
	printf("\n");
	
	return 0;
}


Compiler output:
main.c:5:24: warning: no semicolon at end of struct or union
    5 | struct Node{int p, l, r};
      |                        ^
main.c: In function 'main':
main.c:50:9: error: implicit declaration of function 'ptintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   50 |         ptintf("Inorder\n");
      |         ^~~~~~
      |         printf
main.c:54:9: error: implicit declaration of function 'postPaese'; did you mean 'postParse'? [-Wimplicit-function-declaration]
   54 |         postPaese(root);
      |         ^~~~~~~~~
      |         postParse
Language: C

#include<stdio.h>
#define MAX 10000
#define NIL -1

struct Node{int p, l, r;};
struct Node T[MAX];
int n;

void preParse(int u){
	if(u == NIL) return;
	printf(" %d",u);
	preParse(T[u].l);
	preParse(T[u].r);
}

void inParse(int u){
	if(u == NIL) return;
	inParse(T[u].l);
	printf(" %d",u);
	inParse(T[u].r);
}

void postParse(int u){
	if(u == NIL) return;
	postParse(T[u].l);
	postParse(T[u].r);
	printf(" %d",u);
}

int main(){
	int i,v,l,r,root;
	
	scanf("%d",&n);
	for(i = 0;i < n;i++){
		T[i].p = NIL;
	}
	
	for(i = 0;i < n;i++){
		scanf("%d %d %d",&v,&l,&r);
		T[v].l = l;
		T[v].r = r;
		if(l != NIL) T[l].p = v;
		if(r != NIL) T[r].p = v;
	}
	for(i = 0;i < n;i++) if(T[i].p == NIL) root = i;
	
	printf("Preorder\n");
	preParse(root);
	printf("\n");
	ptintf("Inorder\n");
	inParse(root);
	printf("\n");
	printf("Postorder\n");
	postPaese(root);
	printf("\n");
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:50:9: error: implicit declaration of function 'ptintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   50 |         ptintf("Inorder\n");
      |         ^~~~~~
      |         printf
main.c:54:9: error: implicit declaration of function 'postPaese'; did you mean 'postParse'? [-Wimplicit-function-declaration]
   54 |         postPaese(root);
      |         ^~~~~~~~~
      |         postParse