Language: C

#include <stdio.h>
#include <stdlib.h>
#define MAX 500000

struct  Node{
  int key;
  Node *r, *l, *p;
}
void insert(int);
void inOrder(Node *);
void preOrder(Node *);
Node *root, *NIL;
int main() {
  int i,m,z;
  struct Node node[MAX];
  char command[10];
  scanf("%d",&m);
  for (i = 0; i < m ; i++) {
    scanf("%s",command);
    if (command == "insert") {
      scanf("%d",&z);
      insert(z);
    }
    else if (command == "print") {
      inOrder(root);
      printf("\n");
      preOrder(root);
      printf("\n");
    }
  }
  return 0;
}
void insert(int n) {
  Node *y = NIL;
  Node *x = root;
  Node *z;

  z = (Node *)malloc(sizeof(Node));
  z->key = n;
  z->l = NIL;
  z->r = NIL;

  while ( x != NIL) {
    y = x;
    if (z->key < x->key) {
      x = x->l;
    }
    else{
      x = x->r;
    }
  }
  z->p = y;
  if (y == NIL) {
    root = z;
  }else{
    if (z->key < y->key) {
      y->l = z;
    }else{
      y->r = z;
    }
  }
}
void inOrder(Node *v){
  if (v == NIL) {
    return;
  }
  inOrder(v->l);
  printf(" %d",v->key);
  inOrder(v->r);
}
void preOrder(Node *v){
  if (v == NIL) {
    return;
  }
  printf(" %d",v->key);
  inOrder(v->l);
  inOrder(v->r);
}

Compiler output:
main.c:7:3: error: unknown type name 'Node'
    7 |   Node *r, *l, *p;
      |   ^~~~
main.c:9:1: error: expected ';', identifier or '(' before 'void'
    9 | void insert(int);
      | ^~~~
main.c:10:14: error: unknown type name 'Node'
   10 | void inOrder(Node *);
      |              ^~~~
main.c:11:15: error: unknown type name 'Node'
   11 | void preOrder(Node *);
      |               ^~~~
main.c:12:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   12 | Node *root, *NIL;
      | ^~~~
      | struct 
main.c: In function 'main':
main.c:25:7: error: implicit declaration of function 'inOrder' [-Wimplicit-function-declaration]
   25 |       inOrder(root);
      |       ^~~~~~~
main.c:27:7: error: implicit declaration of function 'preOrder' [-Wimplicit-function-declaration]
   27 |       preOrder(root);
      |       ^~~~~~~~
main.c: In function 'insert':
main.c:34:3: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   34 |   Node *y = NIL;
      |   ^~~~
      |   struct 
main.c:35:3: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   35 |   Node *x = root;
      |   ^~~~
      |   struct 
main.c:36:3: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   36 |   Node *z;
      |   ^~~~
      |   struct 
main.c:38:8: error: 'Node' undeclared (first use in this function)
   38 |   z = (Node *)malloc(sizeof(Node));
      |        ^~~~
main.c:38:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:38:14: error: expected expression before ')' token
   38 |   z = (Node *)malloc(sizeof(Node));
      |              ^
main.c:39:4: error: request for member 'key' in something not a structure or union
   39 |   z->key = n;
      |    ^~
main.c:40:4: error: request for member 'l' in something not a structure or union
   40 |   z->l = NIL;
      |    ^~
main.c:41:4: error: request for member 'r' in something not a structure or union
   41 |   z->r = NIL;
      |    ^~
main.c:45:10: error: request for member 'key' in something not a structure or union
   45 |     if (z->key < x->key) {
      |          ^~
main.c:45:19: error: request for member 'key' in something not a structure or union
   45 |     if (z->key < x->key) {
      |                   ^~
main.c:46:12: error: request for member 'l' in something not a structure or union
   46 |       x = x->l;
      |            ^~
main.c:49:12: error: request for member 'r' in something not a structure or union
   49 |       x = x->r;
      |            ^~
main.c:52:4: error: request for member 'p' in something not a structure or union
   52 |   z->p = y;
      |    ^~
main.c:56:10: error: request for member 'key' in something not a structure or union
   56 |     if (z->key < y->key) {
      |          ^~
main.c:56:19: error: request for member 'key' in something not a structure or union
   56 |     if (z->key < y->key) {
      |                   ^~
main.c:57:8: error: request for member 'l' in something not a structure or union
   57 |       y->l = z;
      |        ^~
main.c:59:8: error: request for member 'r' in something not a structure or union
   59 |       y->r = z;
      |        ^~
main.c: At top level:
main.c:63:14: error: unknown type name 'Node'
   63 | void inOrder(Node *v){
      |              ^~~~
main.c:71:15: error: unknown type name 'Node'
   71 | void preOrder(Node *v){
      |               ^~~~