Language: C

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

#define NIL NULL
 
struct node{
  struct node *l;
  struct node *r;
  struct node *p;
  int key;
};
 
typedef struct node * Node;
 
Node root;

main(){
  int n, i, x;
  char str[20];
  Node s;
  scanf("%d",&n);
 
  for ( i = 0; i < n; i++ ){
    scanf("%s",str);
 
    if (str[0]=='i'){
      scanf("%d",&x);
      insert(x);
    } 
    else if(str[0]=='f'){
      scanf("%d",&x);
      s=Search(root,x);
      if (s!= NIL ) printf("yes\n");
      else printf("no\n");
    }
    else if (str[0]=='p'){
      Inorder(root);
      printf("\n");
       
      Preorder(root);
      printf("\n");
    }
  }
  return 0;
}
void insert(int k){
  Node y=NIL;
  Node x=root;
  Node z;
 
  z = malloc(sizeof(struct node));
  z->key=k;
  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;
}
 
Node Search(Node t,int k){
  if(t==NIL || k==t->key) return t;
  if(k<t->key) return Search(t->l,k);
  else return Search(t->r,k);
}

void Preorder(Node t){
  printf(" %d",t->key);
  if(t!=NIL){
    if(t->l!=NIL)Preorder(t->l);
    if(t->r!=NIL)Preorder(t->r);
  }
}
 
void Inorder(Node t){
   
  if(t!=NIL){
    if(t->l!=NIL){
      Inorder(t->l);
      }
    printf(" %d",t->key);
     
    if(t->r!=NIL){
      Inorder(t->r);
      }
  }
}

Compiler output:
main.c:17:1: error: return type defaults to 'int' [-Wimplicit-int]
   17 | main(){
      | ^~~~
main.c: In function 'main':
main.c:28:7: error: implicit declaration of function 'insert' [-Wimplicit-function-declaration]
   28 |       insert(x);
      |       ^~~~~~
main.c:32:9: error: implicit declaration of function 'Search'; did you mean 'bsearch'? [-Wimplicit-function-declaration]
   32 |       s=Search(root,x);
      |         ^~~~~~
      |         bsearch
main.c:32:8: error: assignment to 'Node' {aka 'struct node *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
   32 |       s=Search(root,x);
      |        ^
main.c:37:7: error: implicit declaration of function 'Inorder' [-Wimplicit-function-declaration]
   37 |       Inorder(root);
      |       ^~~~~~~
main.c:40:7: error: implicit declaration of function 'Preorder' [-Wimplicit-function-declaration]
   40 |       Preorder(root);
      |       ^~~~~~~~
main.c: At top level:
main.c:46:6: warning: conflicting types for 'insert'; have 'void(int)'
   46 | void insert(int k){
      |      ^~~~~~
main.c:28:7: note: previous implicit declaration of 'insert' with type 'void(int)'
   28 |       insert(x);
      |       ^~~~~~
main.c:69:6: error: conflicting types for 'Search'; have 'struct node *(struct node *, int)'
   69 | Node Search(Node t,int k){
      |      ^~~~~~
main.c:32:9: note: previous implicit declaration of 'Search' with type 'int()'
   32 |       s=Search(root,x);
      |         ^~~~~~
main.c:75:6: warning: conflicting types for 'Preorder'; have 'void(struct node *)'
   75 | void Preorder(Node t){
      |      ^~~~~~~~
main.c:40:7: note: previous implicit declaration of 'Preorder' with type 'void(struct node *)'
   40 |       Preorder(root);
      |       ^~~~~~~~
main.c:83:6: warning: conflicting types for 'Inorder'; have 'void(struct node *)'
   83 | void Inorder(Node t){
      |      ^~~~~~~
main.c:37:7: note: previous implicit declaration of 'Inorder' with type 'void(struct node *)'
   37 |       Inorder(root);
      |       ^~~~~~~