自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (3)
  • 收藏
  • 关注

空空如也

数据结构C语言实现系列[2]——栈

struct stack{ elemType *stack; /* 存储栈元素的数组指针 */ int top;

2010-12-05

计算机组成原理(唐朔飞)答案

计算机组成原理(唐朔飞) 第二版 答案,

2011-06-07

数据结构课程设计(翻译标准C版本)

# include<stdio.h> # define STACK_INIT_SIZE 100 # define STACKINCREMENT 10 typedef int SElemType; struct SqStack{ SElemType * base; SElemType * top; int stacksize; int Length; }; struct SqStack S; SElemType * e; void InitStack () { S.base=(SElemType *)malloc(STACK_INIT_SIZE * sizeof(SElemType)); if(!S.base) printf("OVER\n"); else { S.top=S.base; S.stacksize=STACK_INIT_SIZE; S.Length=0; printf("OK\n"); } } void DestroyStack () { free(S.base); printf("OK\n"); } void ClearStack () { free(S.base); S.top=S.base; printf("OK\n"); } void StackEmpty () { if(S.top==S.base) printf("TRUE\n"); else printf("FALSE\n"); } void StackLength () { printf("%d\n",S.Length); } void GetTop () { if(S.top==S.base) printf("EORRO"); else { printf("%d\n",*(S.top-1)); } } void Push () { scanf("%d",S.top); *S.top++; S.Length++; printf("OK\n"); } void Pop () { if(S.top==S.base) { printf("NULL\n"); } else { S.Length--; S.top--; printf("OK\n"); } } void kTraverse () { if (S.top=S.base) { printf("STACK NULL"); } else { e=S.base; while (e<S.top) { printf("%d ",*e); e++; } printf("\n"); } } void main() {}

2010-12-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除