Language: C

#include <stdio.h>
#include <stdlib.h>
typedef struct BinaryTree
{
	int data;
	BinaryTree *lchild,*rchild;
}BinaryTree;
int post[40],i;
void pre_in_order(int *pre,int l1,int r1,int *in,int l2,int r2,BinaryTree **root)
{
	int m;
	i=0;
	*root=(BinaryTree *)malloc(sizeof(BinaryTree));
	(*root)->data=pre[l1];
	m=l2;
	while(pre[l1]!=in[m])
	m++;
	if(m==l2)
	(*root)->lchild=NULL;
	else
	pre_in_order(pre,l1+1,m-l2+l1,in,l2,m-1,&(*root)->lchild);
	if(m==r2)
	(*root)->rchild=NULL;
	else
	pre_in_order(pre,m-l2+l1+1,r1,in,m+1,r2,&(*root)->rchild);
}
void postorder(BinaryTree *root)
{
if(root)
{
postorder(root->lchild);
postorder(root->rchild);
post[i]=root->data;
i++;
}
}
int main(int argc, char *argv[])
{
	int pre[40];
	int in[40];
	int n,i;
	BinaryTree *root;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	scanf("%d",&pre[i]);
	for(i=0;i<n;i++)
	scanf("%d",&in[i]);
	pre_in_order(pre,0,n-1,in,0,n-1,&root);
	postorder(root);
	for(i=0;i<n;i++)
	{
		printf("%d",post[i]);
		if(i+1==n)
		printf("\n");
		else
		printf(" ");
	}
	return 0;
}

Compiler output:
main.c:6:9: error: unknown type name 'BinaryTree'
    6 |         BinaryTree *lchild,*rchild;
      |         ^~~~~~~~~~
main.c: In function 'pre_in_order':
main.c:21:49: error: passing argument 7 of 'pre_in_order' from incompatible pointer type [-Wincompatible-pointer-types]
   21 |         pre_in_order(pre,l1+1,m-l2+l1,in,l2,m-1,&(*root)->lchild);
      |                                                 ^~~~~~~~~~~~~~~~
      |                                                 |
      |                                                 int **
main.c:9:77: note: expected 'BinaryTree **' but argument is of type 'int **'
    9 | void pre_in_order(int *pre,int l1,int r1,int *in,int l2,int r2,BinaryTree **root)
      |                                                                ~~~~~~~~~~~~~^~~~
main.c:25:49: error: passing argument 7 of 'pre_in_order' from incompatible pointer type [-Wincompatible-pointer-types]
   25 |         pre_in_order(pre,m-l2+l1+1,r1,in,m+1,r2,&(*root)->rchild);
      |                                                 ^~~~~~~~~~~~~~~~
      |                                                 |
      |                                                 int **
main.c:9:77: note: expected 'BinaryTree **' but argument is of type 'int **'
    9 | void pre_in_order(int *pre,int l1,int r1,int *in,int l2,int r2,BinaryTree **root)
      |                                                                ~~~~~~~~~~~~~^~~~
main.c: In function 'postorder':
main.c:31:15: error: passing argument 1 of 'postorder' from incompatible pointer type [-Wincompatible-pointer-types]
   31 | postorder(root->lchild);
      |           ~~~~^~~~~~~~
      |               |
      |               int *
main.c:27:28: note: expected 'BinaryTree *' but argument is of type 'int *'
   27 | void postorder(BinaryTree *root)
      |                ~~~~~~~~~~~~^~~~
main.c:32:15: error: passing argument 1 of 'postorder' from incompatible pointer type [-Wincompatible-pointer-types]
   32 | postorder(root->rchild);
      |           ~~~~^~~~~~~~
      |               |
      |               int *
main.c:27:28: note: expected 'BinaryTree *' but argument is of type 'int *'
   27 | void postorder(BinaryTree *root)
      |                ~~~~~~~~~~~~^~~~