摘要: 1 struct BiTree 2 { 3 struct BiTree *lchild; 4 struct BiTree *rchild; 5 }; 6 7 int Node(struct BiTree *T) 8 { 9 if(T == NULL)10 ... 阅读全文
posted @ 2015-03-02 18:39 永久指针 阅读(3926) 评论(0) 推荐(0) 编辑
摘要: C语言标准库中没有 int substr(char *s1, char *s2)/*字符串匹配,成功返回所在位置,不成功返回-1*/ 函数,下面是利用已有的库函数自己实现的substr函数。代码如下: 1 #include 2 3 #include 4 5 int substr(char *... 阅读全文
posted @ 2015-03-02 14:23 永久指针 阅读(14421) 评论(0) 推荐(0) 编辑
摘要: 1:甲乙两队进行比赛,甲队有a、b、c三人,乙队有x、y、z三人,有人想知道比赛对手,a说不和x比赛,c说不和x,z比赛,编程找三对赛手名单。 1 #include 2 3 int main() 4 { 5 char x = 'a',y,z; 6 for(x = 'a'; (x ... 阅读全文
posted @ 2015-03-02 13:24 永久指针 阅读(994) 评论(0) 推荐(0) 编辑