- 博客(3)
- 收藏
- 关注
原创 浅浅实现一下C语言顺序表吧
#include<stdio.h> #include<stdlib.h> typedef char ElemType; #define MAXSIZE 10 typedef struct{ ElemType *elem;//指向线性表的基地址 int uLength; int uListSize; }SqList; //要动态分配与释放 //初始化:可读性变好 bool InitList(SqList &L,unsigned int uListSize){ i.
2022-05-09 16:23:26
118
原创 C语言使用bool函数对几个数进行排序
作为参考 要求 1)分别对输入的3个,4个,5个数进行排序,并输出 2)使用bool函数,不得使用数组 3)使用指针,交换地址内的数 注意: 1)return true&return false 2)3个数时情况较多,4、5个套用即可 #include <stdlib.h> #include <stdio.h> bool SwapInt(int* x, int* y){ int a; a=*x; *x=*y; *y=a; return true; } bool
2022-03-10 22:13:03
1499
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人