17.8 为数组形式的树编写模块,用于从树中删除一个值,如果没有找到,程序节点 ArrayBinaryTree.c // // Created by mao on 16-9-18. // #include "ArrayBinaryTree.h" #include <assert.h> #include <stdio.h> unsigned long leftChild(unsigned long current) { return 2 * current; }…
1编写calloc,内部使用malloc函数获取内存 #include <stdio.h> #include <stdlib.h> void *myAlloc(unsigned long int length, unsigned long int typeSize) { int *ptr; int index = 0; int totalLen = length * typeSize; if(length >= 0 && typeSize >= 0){…