文档介绍:#include<>#include<>#definemax100typedefstructnode{ //二叉树结构chardata;structnode*lc,*rc; //左右子树}bt,*list;/*二叉树A/\B C/\ \D E F/   /\K   G HinputABDK000E00C0FG00H00chen000j00i0ha00o00ouputABDKECFGHKDBEACGFHKDEBGHFCA*/int creat(list*root){//创建一棵二叉树,root使用的是二维指针charn;scanf("%c",&n);//注%C前面加空格是为了起间隔作用scanf不读入空格if(n=='0') //0为间隔{*root=NULL;return0; //输入结束}*root=(list)malloc(sizeof(bt));if(!*root)return0;   (*root)->data=n;creat(&(*root)->lc);creat(&(*root)->rc);return1;}intpre(listroot){//先序遍历if(!root)return0;printf("%c",root->data);pre(root->lc);pre(root->rc);return1;}intmid(listroot){//中序遍历if(!root)return0;mid(root->lc);printf("%c",root->data);mid(root->rc);return1;}int bh(listroot){//后序遍历if(!root) return0;  bh(root->lc);bh(root->rc);printf("%c",root->data);return1;}intsum(listroot,t){//求结点的个数sumif(root){(*cnt)++;sum(root->t);sum(root->t);return1;}return0;}intsumleaf(listroot,t){ //求叶子节点的个数if(root){if((!root->lc)&&(!root->rc)){ (*cnt)++;} sumleaf(root->t);sumleaf(root->t);return1;}return0;}intdeep(listroot,t){//求深度if(!root){*cnt=0;return0;}intm,n;n=m=*cnt;deep(root->lc,&m);deep(root->rc,&n);*cnt=m+1;if(m<n)*cnt=n+1;return1;}void