#include <stdio.h>//定义二叉树结构typedef struct TreeNode{ char val; struct TreeNode* left; struct TreeNode* right;}TreeNode;//创建前序二叉树TreeNode* CreatTree(char* str,int *pi){ if(str[*pi]=='#') { (*pi)++; return NULL; } else { TreeNode* root=(TreeNode*)mallo...