![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
kloumb
闲来无事,上上博客蹭蹭度
展开
-
C语言数据结构入门之自定义数据类型中的自定义数据类型
#include <stdio.h>#include <stdlib.h>// 声明结构的位置,可以放在main()函数外,也可以放在main()函数内// 定义新的类型代替已有类型名// 时间结构typedef struct date{ int year; int month; int day;};// 学生信息typede...原创 2019-11-16 22:57:11 · 533 阅读 · 0 评论 -
C语言数据结构入门之指向自定义数据类型的指针
#include <stdio.h>#include <stdlib.h>// 声明结构的位置,可以放在main()函数外,也可以放在main()函数内// 定义新的类型代替已有类型名typedef struct Student{ char num[8]; char name[16]; char sex[3]; int age;...原创 2019-11-16 22:27:49 · 559 阅读 · 0 评论 -
C语言数据结构入门之自定义数据类型数组
#include <stdio.h>#include <stdlib.h>// 定义新的类型代替已有类型名typedef struct Student{ char num[8]; char name[16]; char sex[3]; int age; char addr[30];};int main(){ ...原创 2019-11-16 22:09:11 · 1159 阅读 · 0 评论 -
C语言数据结构入门之自定义数据类型2
#include <stdio.h>#include <stdlib.h>// 定义新的类型代替已有类型名typedef struct Student{ char num[8]; char name[16]; char sex[3]; int age; char addr[30];};int main(){ ...原创 2019-11-16 22:00:19 · 130 阅读 · 0 评论 -
C语言数据结构入门之自定义数据类型
定义一个自己的数据类型,和系统提供的int、float效果一样;主要注意的是:先声明结构体类型,再定义变量#include <stdio.h>#include <stdlib.h>// 定义新的类型代替已有类型名typedef struct Student{ char num[8]; char name[16]; char sex[...原创 2019-11-16 21:59:38 · 597 阅读 · 0 评论 -
·c结构体数组排序
#include "stdio.h"#include "string.h"struct Student{ int num; char name[20]; float score;};int main(){ struct Student stu[5] = {{1,"gan",90},{2,"li",98},{3,"zhao",80},{4,"chen",86...原创 2019-08-04 00:29:00 · 755 阅读 · 0 评论