随笔分类 - C
C语言
摘要:C语言使用队列和栈实现纸牌游戏–小猫钓鱼 C语言: //纸牌游戏--小猫钓鱼--队列 栈--(所谓的拉火车) #include <stdio.h> struct queue //队列 { int data[1000]; int head; int tail; }; struct stack //栈
阅读全文
摘要:C语言实现队列基本操作-初始化,入队,出队,打印,删除 C语言: #include <stdio.h> #include <stdlib.h> // 队列的实现 #define OVERFLOW -2 #define OK 1 #define ERROR 0 typedef int Status;
阅读全文
摘要:栈-基本操作初始化,返回栈顶,出栈,入栈,判断是否空栈 C语言: #include <stdio.h> #include <stdlib.h> #define STACK_INIT_SIZE 100 // 存储空间初始化分配量 #define STACKINCREMENT 10 // 存储空间分配增
阅读全文

浙公网安备 33010602011771号