随笔分类 - [C语言]
1
摘要:#include #include #include #define N 10 struct student{ /* 学生信息结构 */ char no[9]; /* 学号 */ char name[10]; /* 姓名 */ char sex[3]; ...
阅读全文
摘要:#include #include #include //二叉树节点 typedef struct BitNode{ int data; struct BitNode *lchild; struct BitNode *rchild; }BitNode; BitNode *CreateBitBitNode(void) { BitNode *bt; in...
阅读全文
摘要:qsort函数stdlib.h文件中,函数原型为 void qsort(void *base,size_t nelem,size_t width,int (*Comp)(const void *,const void *)); *base 为要排序的数组 nelem 为要排序的数组的长度 width
阅读全文
摘要:1 #include<stdio.h> 2 #include<stdlib.h> 3 #include <string.h> 4 #define N 10 5 6 7 struct Data 8 { 9 char Name[20];//姓名 10 int Num ;//编号 11 int flags
阅读全文
摘要:1 #include"stdio.h" 2 #include"stdlib.h" 3 #include"string.h" 4 #include"time.h" 5 6 #define LIST_INIT_SIZE 50000 7 int bj1,yd1,bj2,yd2,bj3,yd3,bj4,yd
阅读全文
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 4 #define Maxlen 100 //定义输入字符的长度 5 6 //顺序栈 7 typedef struct 8 { 9 char data[Maxlen];//存储字符 10 int top; 11
阅读全文
摘要:1 #include "stdio.h" 2 #include "string.h" 3 #include "malloc.h" 4 5 struct Student{ 6 char Stu_Number[20];//学号 7 char Stu_Name[10];//姓名 8 char Stu_Be
阅读全文
摘要:源代码: 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 5 #define Score_Num 35 6 7 struct Standard 8 { 9 int A; 10 int B; 11 int C; 12
阅读全文
摘要:1 #include "stdio.h" 2 #include "stdlib.h" 3 #include "malloc.h" 4 #include "string.h" 5 6 const int maxlen=1000;//最大长度 7 typedef char type; 8 9 struc
阅读全文
摘要:1 #include "stdio.h"/*头文件*/ 2 #include "string.h" 3 #include "stdlib.h" 4 #define LEN sizeof(struct student)/*宏定义*/ 5 int n = 0;/*n为静态全局变量,本文件模块中各函数均可
阅读全文
摘要:1 #include <stdio.h> 2 #include <time.h> 3 #include <stdlib.h> 4 5 #define MAXN 150 //最大节点数 6 #define INF ((1<<31)-1) //无穷大数 7 8 int dist[MAXN][MAXN];
阅读全文
摘要:1 #include "stdio.h" 2 #include "stdlib.h" 3 #include "malloc.h" 4 5 const int maxlen=1000;//线性表的最大长度 6 typedef char type; 7 8 struct Data{ 9 char nam
阅读全文
摘要:1 #include "stdio.h" 2 #include "malloc.h" 3 4 #define maxlen 100 5 #define infinity 65535 6 7 struct bnode 8 { 9 int data;//数据 10 bnode *lchild,*rchi
阅读全文
摘要:1 #include"stdio.h" 2 #include"stdlib.h" 3 #include"malloc.h" 4 5 6 const int maxlen=1000;//线性表的最大长度 7 typedef char type; 8 //------------线性表---------
阅读全文
摘要:1 #include"stdio.h" 2 #include"stdlib.h" 3 #include"malloc.h" 4 5 6 const int maxlen=1000;//线性表的最大长度 7 8 //------------线性表------------------ 9 struct
阅读全文
摘要:1 #include "stdio.h" 2 const int maxlen = 1000; 3 #define infinity 65535 4 5 struct encode{ 6 char Data[maxlen];//存储编码(字符类型) 7 int count;//编码的位数 8 };
阅读全文
摘要:顺序线性表的操作 (4人)⑴ 问题描述:已知两长度相同的定长数组,他们分别存放相同个数的整数。实现要求:⑴ 两个数组大小的比较。若第一个数组中的数比第二个数组中的数大的个数大于第一个数组中的数比第二个数组中的数小的个数,认为第一个数组大;若第一个数组中的数比第二个数组中的数大的个数小于第一个数组中的
阅读全文
摘要:1 #include<stdio.h> 2 #include<string> 3 using namespace std; 4 5 const int N=30; 6 int min(int n,int m)//返回两个数中的最小一个数 7 { 8 return (n<m) ? n : m; 9 }
阅读全文
摘要:对任意一篇英文文章,统计其中每个单词分别出现了多少次,并可替换指定的单词。【功能要求】(1)英文文章以文件形式输入。(2)统计结果保存为文件。(3)对单词进行替换时,允许用户选择全部替换,或逐个替换。替换完成后,将文章存盘。 1 #include<stdlib.h> 2 #include<stdio
阅读全文
1

浙公网安备 33010602011771号