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

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

    0
    146
    219KB
    2011-06-07
    35
  • 数据结构课程设计(翻译标准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() {}

    0
    63
    1KB
    2010-12-07
    7
  • 数据结构C语言实现系列[2]——栈

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

    0
    82
    44KB
    2010-12-05
    9
上传资源赚积分or赚钱