Language: C

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

struct node{
  struct node *right;
  struct node *left;
  struct node *parent;
  int key;
};
typedef struct node * Node;
#define NIL NULL

Node root;

Node treeMinimum(Node x){
  while(x.left != NIL) {
    x = x.left;
  }
  return x;
}

Node treeMaximum(Node x){
  while(x.right != NIL) {
    x = x.right;
  }
  return x;

}

Node treeSearch(Node u, int k){
  if(x == NIL || k == x.key) return x;
  if(k < x.key) return treeSearch(x.left,k);
  else return treeSreach(x.right,k);

}

Node treeSuccessor(Node x){
  if(x.right != NIL) return treeMinimum(x.right);

  y = x.p;
  while(y != NIL && x == y.right) {
    x = y;
    y = y.p;
  }
  return y;

}

void treeDelete(Node z){
  Node y; // node to be deleted
  Node x; // child of y
  if(z.left == NIL || z.right ==NIL) y = z;
  else y = Tree - Successor(z);

  if(y.left != NIL) x = y.left;
  else x = y.right;

  if(x != NIL) x.p = y.p;

  if(y.p == NIL) T.root = x;
  else if(y == y.p.left) y.p.left = x;
  else y.p.right = x;

  if(y != z) z.key = y.key;


}

void insert(int k){
  Node y = NIL;
  Node x = root;
  Node z;

  z = malloc(sizeof(struct node));
  z->key = k;
  z->left = NIL;
  z->right = NIL;




}

void inorder(Node u){
  if(x != NILL) 
}
void preorder(Node u){

}


int main(){
  int n, i, x;
  char com[20];
  scanf("%d", &n);

  for ( i = 0; i < n; i++ ){
    scanf("%s", com);
    if ( com[0] == 'f' ){
      scanf("%d", &x);
      Node t = treeSearch(root, x);
      if ( t != NIL ) printf("yes\n");
      else printf("no\n");
    } else if ( com[0] == 'i' ){
      scanf("%d", &x);
      insert(x);
    } else if ( com[0] == 'p' ){
      inorder(root);
      printf("\n");
      preorder(root);
      printf("\n");
    } else if ( com[0] == 'd' ){
      scanf("%d", &x);
      treeDelete(treeSearch(root, x));
    }
  }

  return 0;
}

Compiler output:
main.c: In function 'treeMinimum':
main.c:16:10: error: 'x' is a pointer; did you mean to use '->'?
   16 |   while(x.left != NIL) {
      |          ^
      |          ->
main.c:17:10: error: 'x' is a pointer; did you mean to use '->'?
   17 |     x = x.left;
      |          ^
      |          ->
main.c: In function 'treeMaximum':
main.c:23:10: error: 'x' is a pointer; did you mean to use '->'?
   23 |   while(x.right != NIL) {
      |          ^
      |          ->
main.c:24:10: error: 'x' is a pointer; did you mean to use '->'?
   24 |     x = x.right;
      |          ^
      |          ->
main.c: In function 'treeSearch':
main.c:31:6: error: 'x' undeclared (first use in this function)
   31 |   if(x == NIL || k == x.key) return x;
      |      ^
main.c:31:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:33:15: error: implicit declaration of function 'treeSreach'; did you mean 'treeSearch'? [-Wimplicit-function-declaration]
   33 |   else return treeSreach(x.right,k);
      |               ^~~~~~~~~~
      |               treeSearch
main.c: In function 'treeSuccessor':
main.c:38:7: error: 'x' is a pointer; did you mean to use '->'?
   38 |   if(x.right != NIL) return treeMinimum(x.right);
      |       ^
      |       ->
main.c:38:42: error: 'x' is a pointer; did you mean to use '->'?
   38 |   if(x.right != NIL) return treeMinimum(x.right);
      |                                          ^
      |                                          ->
main.c:40:3: error: 'y' undeclared (first use in this function)
   40 |   y = x.p;
      |   ^
main.c:40:8: error: 'x' is a pointer; did you mean to use '->'?
   40 |   y = x.p;
      |        ^
      |        ->
main.c: In function 'treeDelete':
main.c:52:7: error: 'z' is a pointer; did you mean to use '->'?
   52 |   if(z.left == NIL || z.right ==NIL) y = z;
      |       ^
      |       ->
main.c:52:24: error: 'z' is a pointer; did you mean to use '->'?
   52 |   if(z.left == NIL || z.right ==NIL) y = z;
      |                        ^
      |                        ->
main.c:53:12: error: 'Tree' undeclared (first use in this function); did you mean 'free'?
   53 |   else y = Tree - Successor(z);
      |            ^~~~
      |            free
main.c:53:19: error: implicit declaration of function 'Successor'; did you mean 'treeSuccessor'? [-Wimplicit-function-declaration]
   53 |   else y = Tree - Successor(z);
      |                   ^~~~~~~~~
      |                   treeSuccessor
main.c:55:7: error: 'y' is a pointer; did you mean to use '->'?
   55 |   if(y.left != NIL) x = y.left;
      |       ^
      |       ->
main.c:55:26: error: 'y' is a pointer; did you mean to use '->'?
   55 |   if(y.left != NIL) x = y.left;
      |                          ^
      |                          ->
main.c:56:13: error: 'y' is a pointer; did you mean to use '->'?
   56 |   else x = y.right;
      |             ^
      |             ->
main.c:58:17: error: 'x' is a pointer; did you mean to use '->'?
   58 |   if(x != NIL) x.p = y.p;
      |                 ^
      |                 ->
main.c:58:23: error: 'y' is a pointer; did you mean to use '->'?
   58 |   if(x != NIL) x.p = y.p;
      |                       ^
      |                       ->
main.c:60:7: error: 'y' is a pointer; did you mean to use '->'?
   60 |   if(y.p == NIL) T.root = x;
      |       ^
      |       ->
main.c:60:18: error: 'T' undeclared (first use in this function)
   60 |   if(y.p == NIL) T.root = x;
      |                  ^
main.c:61:17: error: 'y' is a pointer; did you mean to use '->'?
   61 |   else if(y == y.p.left) y.p.left = x;
      |                 ^
      |                 ->
main.c:61:27: error: 'y' is a pointer; did you mean to use '->'?
   61 |   else if(y == y.p.left) y.p.left = x;
      |                           ^
      |                           ->
main.c:62:9: error: 'y' is a pointer; did you mean to use '->'?
   62 |   else y.p.right = x;
      |         ^
      |         ->
main.c:64:15: error: 'z' is a pointer; did you mean to use '->'?
   64 |   if(y != z) z.key = y.key;
      |               ^
      |               ->
main.c:64:23: error: 'y' is a pointer; did you mean to use '->'?
   64 |   if(y != z) z.key = y.key;
      |                       ^
      |                       ->
main.c: In function 'inorder':
main.c:85:6: error: 'x' undeclared (first use in this function)
   85 |   if(x != NILL)
      |      ^
main.c:85:11: error: 'NILL' undeclared (first use in this function); did you mean 'NIL'?
   85 |   if(x != NILL)
      |           ^~~~
      |           NIL
main.c:86:1: error: expected expression before '}' token
   86 | }
      | ^