本份代码需要两个栈。一个是符号栈,一个是数字栈。输入中序表达式如9+(3-1)*3+10/2##define _CRT_SECURE_NO_WARNINGS#include#include#define max 100char ex[max]; /*存储后序表达式*//*函数功能:将中序表达式转化为...
分类:
其他好文 时间:
2015-07-07 12:43:02
阅读次数:
207
、#include "stdio.h"#include "stdlib.h"typedef struct List { int data; //数据域 struct List *next; //指针域} List;void TailCreatList(List *L) //尾插法建立链表{ List...
分类:
其他好文 时间:
2015-07-07 12:37:15
阅读次数:
217
代码一: 1 /********************************** 2 程序功能:用按键控制LED灯熄灭 3 ***********************************/ 4 #include 5 6 void int_clk(); 7 void main() 8 .....
分类:
其他好文 时间:
2015-07-07 12:34:36
阅读次数:
102
#include "stdio.h"#include "string.h"#include "ctype.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#...
分类:
其他好文 时间:
2015-07-07 12:32:53
阅读次数:
111
#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 20 /* 存...
分类:
其他好文 时间:
2015-07-07 12:32:00
阅读次数:
124
进程间的互斥,我们可以让这些进程共享某个内存区(mmap实现),然后在该共享内存区中使用某种类型的同步变量但是,fcntl记录上锁往往更容易使用。#include #include int fcntl(int fd, int cmd, ... /* struct flock *arg */ );st...
分类:
系统相关 时间:
2015-07-07 12:27:55
阅读次数:
137
/*
* 18_数组-二维数组.c
*
* Created on: 2015年7月6日
* Author: zhong
*/
#include
#include
/**
* 二维数组:
* 为什么要用二维数组呢;
* 例如: 网络班有2个班,每班有5人。
* 要想存储一班的学生的年龄 定义一个一维数组搞定 int ages[5]={18,19,20,...
分类:
编程语言 时间:
2015-07-07 11:11:19
阅读次数:
125
#include #include const int maxn =3000;int main(){ int f[maxn]; memset(f, 0, sizeof(f)); int i,j,n;f[0]=1; scanf("%d",&n); for (i=2...
分类:
其他好文 时间:
2015-07-07 11:05:42
阅读次数:
106
链接:http://www.nowcoder.com/questionTerminal/5bed191944ce4eaa93f4bae50abc90df题目描述给定一个正整数数列,和正整数p,设这个数列中的最大值是M,最小值是m,如果M 4 #include 5 #include 6 #inc...
分类:
其他好文 时间:
2015-07-07 10:55:54
阅读次数:
88
静态表查找包括:顺序表查找、有序表查找、静态树表查找、索引表查找
具体原理这里不叙述,详见严蔚敏《数据结构》。1、顺序表查找//SequenceTableSearch.c#include
#include
#include typedef char KeyType;//定义关键字类型
typedef struct{
KeyTyp...
分类:
其他好文 时间:
2015-07-07 09:35:50
阅读次数:
116