12 2020 档案

摘要:getc(): 调用方式:int getc(FILE *stream) 它返回指定输入流stream的当前位置的下一个字符,并增加文件的位置指示器. 例如:1 #include 2 #include //此头文件中包含了linux定义的常用常量 3 int main(int argv,char ar 阅读全文
posted @ 2020-12-22 16:09 wu_yan 阅读(308) 评论(0) 推荐(0)
摘要:数据结构实验,hash表 采用链地址法处理hash冲突 代码全部自己写,转载请留本文连接, 附上代码 #include<stdlib.h>#include<stdio.h>#include<string.h>#include<conio.h>#define NAMESIZE 20//姓名长度#def 阅读全文
posted @ 2020-12-12 20:30 wu_yan 阅读(344) 评论(0) 推荐(0)
摘要:数据结构实验一个简单的二叉树代码原创 安装提示输入基本没bug,非法输入未过滤。 #include <stdio.h> #include<stdlib.h> struct tnode /*定义二叉树存储结构*/ {char data; struct tnode*lchild; struct tnod 阅读全文
posted @ 2020-12-11 14:38 wu_yan 阅读(143) 评论(0) 推荐(0)
摘要:int *t; t=(int*)malloc(sizeof(int)); 一个指针包含两个地址,一个为它的自身地址另一个为储存的地址; 声明指针时只是声明了一块内存存放指针变量,而此时指针变量是没有指向任何内容。 此事需要声明一个指针所指的类型的变量的内存; t=(int*)malloc(sizeo 阅读全文
posted @ 2020-12-04 15:18 wu_yan 阅读(373) 评论(0) 推荐(0)