数据结构X
Jackdot
这个作者很懒,什么都没留下…
展开
-
数据结构X实验一
/** *定义头文件和常量 **/ #include <stdio.h> #include <stdlib.h> #include <malloc.h> #define OK 1 #define ERROR 0 #define TRUE 1 #define FALSE 0/*定义顺序链表数据*/ #define ElemType int #define MAXSIZE 100 /*此原创 2016-05-07 17:41:19 · 326 阅读 · 0 评论 -
数据结构x实验二--非负十进制转换为八进制
#include <stdio.h> /*非负十进制转换为八进制*/ void toOct(int input) { int result[10],index=0; int next = 1,oct,deal=input; while(deal != 0){ next = deal/8; /*判断下一个运算数是否小于8,如果小于8就跳出*/原创 2016-05-07 17:59:20 · 2249 阅读 · 0 评论 -
数据结构x实验三--串的操作
//头文件 #include <stdio.h> #include <stdlib.h> /*定义串的最大长度*/ #define MAXLEN 40 typedef struct { /*串结构定义*/ char ch[MAXLEN]; int len; }SString;/*创建字符串*/ void createstring(SString *s) {原创 2016-05-07 18:03:37 · 1104 阅读 · 0 评论