北航2015年考研991科目的答案
2015年全国硕士研究生入学统一考试数学(一)答案
y
z
2 sin cos ,
,
从
2
到
2
I ( y z)dx (z 2 x 2 y)dy (x 2 y 2)dz L
2
(
2 sin cos )sin
2 sin
2 cos (cos 2 2sin 2 ) sin d
2
2
2
2
sin 2
1 2
sin
2
sin
sin3
W
W
02
0
4
13、【答案】 2n1 2
【考点】行列式的计算 【难易度】★★★ 【详解】按第一行展开得
2n1 2 14、【答案】 1
2
【考点】 【难易度】★★
【详解】(X ,Y ) ~ N(1, 0,1,1, 0) , X ~ N (1,1),Y ~ N (0,1), 且 X ,Y 独立
X 1 ~ N(0,1) , PXY Y 0 P(X 1)Y 0
1 0
0 1 2k
k
1 k
k
0 ,得 k
0 ,并解得
x
c
0 1
,
c
为任意常数。
从而 c1 c3, c 为任意常数。
21、【考点】相似矩阵,相似对角化
【难易度】★★★
0 2 3
1 2 0
【详解】由
A
1 1
3 2
3 a
相似于
B
0 0
b 3
0 1
0 3 a 1 b 1
0 2 3 1 2
P(AB) P(A) P(B) 故选(C) 2
8、【答案】(D) 【考点】 【难易度】★★★ 【详解】
E X X Y 2 E X 2 XY 2X E X 2 E XY 2E X
2015年北京航空航天大学考研、复试解析,考研心态,考研大纲,考研真题,考研经验
北航考研详解与指导一、学习方面:数学,这是一门高技术的公共课,需要的是长期不间断的投入时间和精力。
去年我的成绩是128分,说一下我的数学参考书:同济版高数课本上下册、线性代数课本+李永乐复习全书+660+李永乐真题解析。
时间安排:课本第一遍我在五月份刚开始就已经搞定,之后便开始啃全书(此时,我也在看张宇的视频,一般这个时候大家晚上八点半就都不在教室了,自己可以拿着电脑在教室里放外音,很爽的,宇哥视频幽默易懂),在第一遍看全书过程中,会发现前面的极限一章很难搞明白,几乎每一张上能看懂的不超过三分之一(这是看,不是自己做,自己做你会发现自己根本不适合考研),这是绝对正常的,要知道全书上的知识点很多是由真题直接改编而成的,要是能看懂的话,那我们就不用准备了,可以直接读研了!在七月份的时候我参加了学校组织的数学提高班,这断断续续用了半个月,上午上课,晚上反馈。
(PS我坚决不建议大家报**什么的辅导班,不要以为大家都报自己不报就会吃亏,盲目跟大流等于自欺欺人!)在7月底8月初时我的数学全书已完成一边。
此时,经过学校的培训和自己的学习加上视频,我的数学水平已经有所改善。
之后,我放下高数,用了二十天把线性代数搞定,线代部分需要较强的逻辑思维,只要用心,可以一次弄利索了。
(注意考研真题的几种常考题型,切记要多总结)。
总之,数学需要时间投入,不可以偷懒,更不可眼重手轻,可以负责任的说,只要不好好动笔的同学,最后一般数学都考的不理想,要么有思路计算出错,要么在一个拐弯处绊倒。
英语,同样需要时间投入,我的考研分数不太理想,所以在英语上不敢妄加评论。
但是我自己觉得复习的还是蛮充分的,唯一出错的环节就是单词部分,后期单词记忆部分精力不够。
同样说一下我的复习用书:张剑基础阅读100篇(这个我用的是去年的师兄的,他只给我留了40篇左右文章没做,都说这个不太有用,因为它的出题思路确实和真题大相径庭,不建议全部做,可作为前期热身用)+新东方乱序版单词书+真题(4份)+模拟题一份。
北航2015级硕士研究生数理统计参考答案(B层)
2015-2016 学年 第一学期期末试卷参考答案学号 姓名 成绩 考试日期: 2016年1月15日考试科目:《数理统计》(B 层)一、填空题(本题共16分,每小题4分)1.设12,,n x x x ,是来自正态总体2(0,)N σ的简单样本,则当c = 时,统计量221()nkk x cxx η==-∑服从F -分布,其中11nk k x x n ==∑。
((1)n n -)2. 设12,,n x x x ,是来自两点分布(1,)B p 的简单样本,其中01p <<,2n ≥,则当c = 时,统计量2ˆ(1)cx x σ=-是参数()(1)q p p p =-的无偏估计,其中11nk k x x n ==∑。
(1n n -)3.设总体X 的密度函数为22,[0,](;)0,[0,]x x p x x θθθθ⎧∈⎪=⎨⎪∉⎩,其中0θ>,12,,,n x x x 是来自总体X 简单样本,则θ的充分统计量是 。
(()n x ) 4.设12,,n x x x ,是来自正态总体2(,)N μσ的简单样本,已知样本均值 4.25x =,μ的置信度为0.95的双侧置信区间下限为3.1,则μ的置信度为0.95的双侧置信区间为(,)。
((3.1,5.4))二、(本题12分)设12,,,n x x x 是来自正态总体2(1,2)N σ的简单样本。
(1)求2σ的极大似然估计2σ;(2)求2σ的一致最小方差无偏估计;(3)问2σ的一致最小方差无偏估计是否为有效估计?证明你的结论。
解(1)似然函数为22211()exp{(1)}4nnii L x σσ==--∑对数似然函数为222211ln ()(ln(4)ln )(1)24n i i n L x σπσσ==-+--∑求导,有222241ln ()1(1)24n i i L n x σσσσ=∂=-+-∂∑ 令22ln ()0L σσ∂=∂,可得θ的极大似然估计为2211ˆ(1)2n i i x n σ==-∑。
北航2011年硕士研究生入学考试数据结构与C语言试题与答案
2011 年硕士研究生入学考试“数据结构与C语言程序设计”(科目代码:991)试题与答案一、单项选择题(本题共20分,每小题各2分)1.下列关于线性表的存储结构的叙述中,错误的是。
A.线性表的顺序存储结构中隐式地存储了数据元素之间的逻辑关系B.线性表的顺序存储结构一定需要占用一片地址连续的存储空间C.线性表的链式存储结构通过指针来反映数据元素之间的逻辑关系D.线性表的链式存储结构占用的存储空间一定不连续2.若front 和rear 分别表示链接队列的队头指针与队尾指针,则向队列中插入一个由p 指的新元素的过程是依次执行。
A.rear=p; front=p; B.front=p; rear=p;C.rear->link=p; rear=p; D.front->link=p; rear=p;3.下列关于二叉树的叙述中,正确的是。
A.二叉树的度可以小于2 B.二叉树的度等于2C.二叉树中至少有一个结点的度为2 D.二叉树中每一个结点的度都为24.若某二叉树有40个叶结点,则该二叉树的结点总数最少是。
A.78 B.79 C.80 D.815.若采用邻接矩阵存储一个有向图,且邻接矩阵主对角线以下元素均为0,则该有向图的拓扑序列。
A.存在且惟一B.存在但可能不惟一C.不存在D.无法确定6.下面关于AOE 网的叙述中,正确的是。
A.AOE 网是一个带权的连通图B.AOE 网是一个带权的强连通图C.AOE 网是一个带权的无回路的连通图D.AOE 网是一个带权且无回路的有向图7.下列关于线性表查找方法的叙述中,错误的是。
A.顺序查找法适合于采用顺序存储结构和链式存储结构的线性表的查找B.对于相同元素,顺序查找法一定能够查找到表中首次出现的元素C.对于相同元素,折半查找法一定能够查找到表中首次出现的元素D.对于相同元素,折半查找法不一定能够查找到表中首次出现的元素8.在二叉排序树中进行查找的平均时间效率主要与下列因素之一有关,该因素是。
北京航空航天大学-991-2017-真题
已今, f ., 北京航空航天大学2017年硕士研究生招生考试初试试题科目代码:991 数据结构与C 语言程序设计(共7页)考生注意:所有答题务必书写在考场提供的答题纸上,写在本试题单上的答题一律无效(本题单不参与阅卷)。
一、单项选择题(本题共20分,每小题各2分)1."数据结构”课程研究的内容主要包括_——°A.数据的逻辑结构与存储结构;B.数据的逻辑结构与对数据进行的操作(即算法);C.数据的存储结构与对数据进行的操作(即算法);D.数据的逻辑结构、存储结构以及对数据进行的操作(即算法)。
2. 与单向链表相比,双向链表的优点之一是___。
A.可以进行随机访问;B.可以访问链表中的相邻结点;C.链表的插入和删除操作更加简便;D . 可以节省头结点指针。
3.通常情况下,将递归算法转换为等价的非递归算法需要使用一种数据结构来保存中间结果,这种数据结构是A .堆栈; B.队列; c.二叉树; D.图。
4.深度为h的完全二叉树的结点总数不会超过一。
A.2气B.2h 一1;C .2h : D.2h +l 。
5.若某二叉树的前序遍历序列为a,b, e, f, c, d, g, 中序遍历序列为b,f, e, a , d, g, c, 则后序遍历序列为———°A.f, e, b, g, d, c, a;C.b, f , e, a, d , g, c;B.f, g, e , d, b , c, a ;D.f, e, b, a, g, d, c 。
t夕__,一. 6.对千一个具有n 个顶点的有向图,其边数最多为___。
A.nX(n -1)/2条;B. n-1条;C.nX(n-1)条;D.n 2条。
第991—1页k'/后计算表达式"1a+28+3吽…+n a"的结果。
需要注意的是,当a或者n小千等千0时,该函数返回0。
提示:可以先编写一个求解旷的辅助函数,再在psum函数中计算累加和。
北京航空航天大学991数据结构与C语言程序设计历年考研真题专业课考试试题
2017年北京航空航天大学991数据 结构与C语言程序设计考研真题
2018年北京航空航天大学991数据 结构与C语言程序设计考研真题
目 录
2010年北京航空航天大学993数据结构与C语言程序设计考研真题 2011年北京航空航天大学991数据结构与C语言程序设计考研真题 2012年北京航空航天大学991数据结构与C语言程序设计考研真题 2013年北京航空航天大学991数据结构与C语言程序设计考研真题 2014年北京航空航天大学991数据结构与C语言程序设计考研真题 2015年北京航空航天大学991数据结构与C语言程序设计考研真题 2016年北京航空航天大学991数据结构与C语言程序设计考研真题 2017年北京航空航天大学991数据结构与C语言程序设计考研真题 2018年北京航空航天大学991数据结构与C语言程序设计考研真题
2014年北京航空航天大学991数据 结构与C语言程序设计考研真题
2015年北京航空航天大学991数据 结构与C语言程序设计考研真题
2016年北京航空航天大学991数据 结构与C语言程序设计考研真题
2010年北京航空航天大学993数据 结构与C语言程序设计考研真题
2011年北京航空航天大学991数据 结构与C语言程序设数据 结构与C语言程序设计考研真题
2013年北京航空航天大学991数据 结构与C语言程序设计考研真题
2015年北京航空航天大学控制工程真题汇总、真题解析,复试经验,考研真题,考研笔记,考研经验
1
2
X sin t cos t cos td (t )
2
1
0
cos td (t )
2
1
2
cos td (t )
2
1
0
sin t 0 sin t
X sin 2 td (t ) 1
1
=0
B1
2
0
y (t ) sin td (t )
0.5 2 2 0.5 4 2
X sin t 1 X sin t 1
2k t (2k 1) (2k 1) t 2k
kz
求傅立叶级数
A1
1
1 2 1
0
1
0
X sin t cos t cos td (t ) X sin t cos td (t ) X sin td (2t )
解答: G ( s )
0.5( s 1) s ( s 1)
右平面有一个极点
G ( j )
求渐近线
0.5( j 1) 0.5( j 1) 0.5( j 1)( 2 j ) 0.5(2 2 j 3 j ) j ( j 1) 2 j ( 2 j )( 2 j ) 4 2
(5)再由根之和法则就可得出如图所示的根轨迹。
2001(八)采样系统如图 3 所示,求出 C ( z ) 的表达式。
解答: C ( s ) R ( s )G ( s ) D ( s ) H1 ( s )G ( s )
*
(1)
D( s ) R ( s )G ( s ) H 2 ( s ) D* ( s ) H1 ( s )G ( s ) H 2 ( s )
2015真题
北京航空航天大学2015年硕士研究生入学考试试题科目代码:911材料综合考生注意:(1)所有答案务必书写在考场提供的答题纸上,写在本试题单上的答案一律无效(本题单不参与阅卷)。
(2)试卷中“物理化学”和“材料现代研究方法”两部分所有学生必答。
“金属学原理”、“无机非金属材料学”和“高分子物理”三部分只能任选其一,必须在答题纸开头醒目位置注明所选内容。
“物理化学”部分一、判断题(共8分,每小题2分;正确者打“√”,错误者打“×”)()1.已知反应N2(g)+O2(g)=2NO(g)常温下为非自发过程,而高温下可自发。
因此该反应是吸热和熵增的。
()2.由式∆G=W′可知,吉布斯函数G是系统能做非体积功的能量。
()3.定温定压条件下,合成氨系统存在杂质气体组分时,会降低氨的产率,是由于反应的ΣνB<0,总摩尔数的增加,使平衡常数降低所致。
()4.复相催化反应中,反应物在催化剂表面多发生化学吸附。
而化学吸附比物理吸附具有高的选择性。
二、填空题(共16分,每空2分)1.热力学第二定律的数学表达式为;其物理含义为。
2.反应的标准摩尔吉布斯函数变是指;其与反应的标准平衡常数的关系为;其值的正、负可用以判断处于状态下的反应方向。
3.某盐与水可形成3种含水盐晶体。
标准压力下:系统最大共存相数为,与液态水和水蒸气平衡共存的含水盐最多可有种。
4.一定温度下,零级反应半衰期与反应物初始浓度的关系是。
三、回答题(共18分,每小题6分)1.阐述反应焓变与反应热有何关系,什么条件下二者等值。
2.作图并描述弯曲液面附加压力的产生,写出常温常压下附加压力与曲率半径及表面张力的关系。
3.分析冰的熔点随压强增大而降低现象的原理。
四、计算题(本题18分)已知298K——1460K范围内,下列反应的标准吉布斯函数变与温度的近似关系如下:4Fe3O4+O2=6Fe2O3rG mθ/J·mol-1=-5.0×105 + 280 (T/K)(1)估算该反应的标准摩尔焓变和标准熵变;(2)标准态下,所给温度范围内磁铁矿和赤铁矿何者稳定?(3)该反应的平衡氧分压随温度升高如何变化?五、计算题(本题15分)电池Sb(s) | Sb2O3(s) | 待测溶液|| 饱和KCl溶液|Hg2Cl2(s) | Ag(s)(1)正确写出电池反应;(2)298K下,当某溶液为pH=3.98的缓冲溶液时,测得电池的电动势E1=0.2280V;当测得电池电动势E2=0.3450V时,计算待测溶液的pH值。
北航考研991考试大纲
991数据结构与C语言程序设计考试大纲(2013版)2013年《数据结构与C语言程序设计》考试内容包括“数据结构”与“C语言程序设计”两门课程的内容,各占比例50%,试卷满分为150分。
《数据结构》部分指定参考书:《数据结构教程(第二版)》唐发根编著北京航空航天大学出版社一、概述1.数据的逻辑结构与存储结构的基本概念;2.算法的定义、基本性质以及算法分析的基本概念,包括采用大 形式表示时间复杂度和空间复杂度。
二、线性表1.线性关系、线性表的定义,线性表的基本操作;2.线性表的顺序存储结构与链式存储结构(包括单(向)链表、循环链表和双向链表)的构造原理;3.在以上两种存储结构的基础上对线性表实施的基本操作,包括顺序表的插入与删除、链表的建立、插入与删除、查找等操作对应的算法设计(含递归算法的设计)。
三、堆栈与队列1.堆栈与队列的基本概念与基本操作;2.堆栈与队列的顺序存储结构与链式存储结构的构造原理;3.在不同存储结构的基础上对堆栈与队列实施插入与删除等基本操作的算法设计;4.堆栈和队列在解决实际问题中应用。
四、树与二叉树1.树与二叉树的基本概念,基本特征、名词术语;2.完全二叉树与满二叉树的基本概念,二叉树的基本性质;3.二叉树与树、树林之间的转换;4.二叉树的顺序存储结构与二叉链表存储结构;5.二叉树的前序遍历、中序遍历、后序遍历和按层次遍历,以及在二叉链表基础上各种遍历算法(重点为非递归算法)的设计与应用;6.二叉排序树的基本概念、建立(插入)、查找与平均查找长度ASL的计算;7.哈夫曼(Huffman)树的基本概念,哈夫曼树的构造与带权路径长度(WPL)的计算。
五、图1.图的基本概念、名词术语;2.图的邻接矩阵存储方法和邻接表(含逆邻接表)存储方法的构造原理及特点;3.图的深度优先搜索与广度优先搜索;4.最小(代价)生成树、最短路径、AOV网与拓扑排序以及AOE网与关键路径的基本概念与求解过程。
北航2015年考研991科目的答案
北航2015年考研991科目的答案一、单项选择题1.C 2.A 3.D 4.B 5.C 6.B 7.D 8.A 9.C 10.D 二、填空题1.顺序2.O(m) 3.log2k+1 4.235 5.2(n-1) 6.该有向图中不存在回路7.2.9 8.m-1 9.插入排序法10.9三、综合题1.答:(1)多个堆栈共享一个连续的存储空间,可以充分利用存储空间,只有在整个存储空间都用完时才能产生溢出,其缺点是当一个堆栈溢出时需要向左、右栈查询有无空闲单元。
若有,则需要移动相应元素和修改相关的栈底和栈顶指针的位置。
当各个堆栈接近溢出时,查询空闲单元、移动元素和修改栈底栈顶指针位置的操作频繁,计算复杂,并且耗费时间。
(2)每个堆栈仅用一个顺序存储空间时,操作简便。
但难以确定初始分配存储空间的大小,空间分配少了,容易产生溢出,空间分配多了,容易造成空间浪费;并且各个堆栈不能共享空间。
(3)一般情况下,分别建立多个链接堆栈不考虑堆栈的溢出(仅受用户内存空间限制),缺点是堆栈中各元素要通过指针链接,比顺序存储结构多占用存储空间。
2.(T->lchild==NULL && T->rchild==NULL) T->lchild T->rchild3.(由于图表显示限制,此题答案见指定教材(《数据结构教程第二版》(2012年4月第7次印刷)) 第418页8-16题)4.(1).根据α=散列表中存入的元素数/散列表的长度,得到表的长度为18,因此,合适的散列函数应该为H(k)=k MOD 17。
(2).(由于图表显示限制,此题答案见指定教材(《数据结构教程第二版》(2012年4月第7次印刷)) 第428页9-15题)四、算法设计题SORT(int A[ ], int n){ int ,i, j, min, max, temp; i=1;while(i<=n/2){ min=i; max=i;for(j=i+1;j<n-i+1;j++){ if(A[j]<A[min])min=j; if(A[j]>A[max]) max=j;} /* 确定某趟排序的最小值元素和最大值元素*/ if(min!=i){temp=A[min]; A[min]=A[i]; A[i]=temp; } /* 交换A[min]与A[i]的位置*/ if(max!=n-i+1) if(max==i){temp=A[min]; A[min]=A[n-i+1]; A[n-i+1]=temp; } /* 交换A[min]与A[n-i+1]的位置*/ else{temp=A[max]; A[max]=A[n-i+1]; A[n-i+1]=temp; /* 交换A[max]与A[n-i+1]的位置*/ } i++; } }五、填空题1.break a/q 2.a[n-1]>=a[n-2] FUNC2(a, n-1) 3.(*(a+i)+i) (*(a+i)+N-i-1) 4.i!=0 n%10+′0′5.ch-=30 ch-=266.*(s+i) t++ 7.strlen(p)-1 p<q 8.ch & 24 9.4 &number 10.argv[1],“rb”argv[2], “wb”六、简答题1.答:通常有下列三种方式:(1)参数传递方式:函数调用时根据实参传递给形参内容的不同又分为值传递与地址传递两种。
北航991真题答案
一.单项选择题1 选C 前三步操作相同,主要看第四步,先分析前三步做了什么,一二的操作是修改p的前后节点,而p是需要插入的节点,所以还要修改的是q和原本q的后面一个节点2 选D,队列为空的情况3 选A,排除带括号的,括号外的为x4 选D,8层的完全二叉树,第7层为2^6个节点,64个节点,非叶节点为54个,第8层为108个节点,前7层为2^7-1个,127个,共127+108=235,一个有几种情况?3种,7层的完全二叉树,一种234,快速方法,不用计算,因为肯定多于70多,又必是奇数5 选B,送分题6 选D,连通可能有回路,一般无向图不讨论拓扑排序7 选A 0 99中进行查找49,24,11,5,2,0算出了六次,一共七次,用满二叉树来计算,一个6层的满二叉树为63个元素,7层的是127个元素8 选C9 选D,插入排序是不是?10 选A,倒数第二个找到之后,最后一个数不需要进行排序二简答题1 见笔记本2 递归调用自身的,堆栈3 初始点,遍历方法,边的顺序4 不细讲,算一下,选择排序是10000 + ···+9991,快速排序差不多为n*Logn,即10000*log10000,堆是log10000三综合题1 ABCFED | ABFCED从A开始,没有指向A的边,把图画出来即可2 先从层序开始,根节点为A,在中序中C为A的左子树序列,DFBE是右子树序列。
再看A的左子树DFBE在层序中B为第一个,所以B为子树的根节点,再回到中序,DF 在B的前面,所以为左子树,E为右子树。
再分析子树DF,DF在层序中D为第一个,所以D为根节点,而中序中F在D的右边所以F为D的右孩子3 17填在位置5,27填在位置04 求数组的最大值,可以写得详细点四、算法设计题利用堆栈结构,我写是四不像,没有先后顺序,可以进行修改,改成前序typedef int ElementType;//多余的一行,但能使程序可以编译typedef struct BinaryNode{struct BinaryNode*lchild;ElementType data;struct BinaryNode*rchild;}Node,*BinaryTree;Node*searchBroNode(BinaryTree T,Node*q) {Node*Stack[100];int top = -1;Stack[++top] = T;while(top != -1){Node*current = Stack[top--];if(current->lchild == q)return current->rchild;elseif(current->lchild)Stack[++top] = current->lchild;if(current->rchild != q)return current->lchild;elseif(current->rchild)Stack[++top] = current->rchild;}return NULL;}五、单项选择题1.选B2 选C,由于i会导致全部都变为double3 选A4 选C,A必须有输入项,B规定位数没用,输入项必须是变量,或者说地址5 选D,可以这么想,循环继续进行下去的条件是s不等于100且k小于3,则结束条件就是s等于100或者k大于等于36 选A,j++是先执行完这条语句然后再j++,所以循环结束j大于等于4,j++就是57 选B,D还有什么反例?return8 选B9 选D10 选C,“123456”可以看成const char *11 选C,A是比较地址,B是判断两个是否相等12 选B,第一个都是参数的数量,与参数名无关,第二个参数是字符串数组,标准形式是char*argv[ ],等同于char**13 选A,所有变量都是传递值,但是传地址是传什么?传地址也是传地址的值,所以说传地址实际上也是传值14 选D15 选C,这是一个指针数组,数组存放的是int类型的指针,需要区别的是D,D是数组指针,所以选C,原因在于[ ]的优先级高于*16 选D,a三个元素分别的值是{1001,20},{1002,19},{1003,21},只有第2个结构体的age是1002,所以是B,D,B是1001,D是正确答案17 选C,强制类型转换需要带括号18 选D,了解宏定义是什么,宏定义再预处理阶段做处理19 选A,C最完善,但正常不需要这样20 选B,指向结尾所以是a,同时是可读写所以是a+六、填空题1 1,1跟结合性有关,b=1,a=0,运算顺序,b--,重点a+b其中b已经减1了,然后是<=,!=,最后是||2 5 来看一下f是在,干什么,大致跟长度有关,最后s指向字符串开头,p指向’\0’,用一个字符串长度为1的字符串作例子,则返回1,所以返回字符串长度3 11 7 i=(2*M)=>> i=(2*N+1) =>> i=(2*5+1),所以i=11,j=(1+1*M) =>> j=(1+1*5+1) =>> j=74 123456 这道题的疑问就是有没有空格七、程序设计题#include <stdio.h>int main(int argc,char *argv[]){int a,n;scanf("%d %d",&a,&n);int sum = 0;int temp = 0;int i;for(i = 0;i < n;i++){temp = temp * 10 + a;sum += temp;}printf("%d\n",sum);return 0;}八、程序设计题。
北京航空航天大学991数据结构与C语言程序设计考研真题试题2016年
B. 无向图;
C. AOV网;
D. AOE网。
,; .
7令下列关千带权连通图的最小生成树的叙述中 令 正确的是一。 A. 最小生成树的代价不一定比该图其他任何一棵生成树的代价小;
B. 若图中出现权值相同的边时,则该图的最小生成树不是惟一的;
c. 若图中边上的权值各不相同,则该图的最小生成树是惟一的;
北京航空航天大学2016 年
硕士研究生招生考试初试试题科目代码991
数据结构与 C 语言程序设计(共 8页)
考生注意:所有答题务必书写在考场提供的答题纸上,写在本试题单上的 答题一律无效(本题单不参与阅卷)。
一、单项选择题(本题共20分,每小题各2分)
L若listl和list2分别为一个指向单向链表与指向双向链表的指针变量则下列叙述中, 正确的是—°
A. list2比listl占用更多的存储单元; B. Iistl与list2占用相同多的存储单元; C. listl和list2应该是相同类型的指针变量; D. 双向链表比单向链表占用更多的存储单元。
Байду номын сангаас
2. 下列关于队列的叙述中,错误的是 '0 A. 队列是一种插入和删除位置受到限制的特殊线性表; B. 做删除操作时要先判断队列是否为空,做插入操作时要先判断队列是否已满; C. 采用循环链表作为存储结构的队列称为循环队列; D. 通常情况下,循环队列比非循环的队列的空间使用率要高。
s. 若采用快速排序法对序列(49, 38, 65, 97, 76, 13, 27. 49')的元素按值从小到大进行排
D. push, pop, push, pop, push, pop。
4. 若某完全二叉树的第6层有24个叶结点,则该完全二叉树的结点总数最大为-一°
2015年北京航空航天大学英语翻译硕士MTI真题及答案解析
2015年北京航空航天大学英语翻译硕士MTI真题及答案解析(1/30)Vocabulary第1题I hope you don´t think I´m______but I´ve had the electric fire on for most of the day.A.exquisiteB.extravagantC.exoticD.eccentric下一题(2/30)Vocabulary第2题Beene´s new novel proves he isn´t just a______in the pan.A.flareB.glitterC.sparkD.flash上一题下一题(3/30)Vocabulary第3题The newly-built Science Building seems______enough to last a hundred years.A.spaciousB.sophisticatedC.substantialD.steady上一题下一题(4/30)Vocabulary第4题There is nothing in physical structure, the brain or the internal organs to______a difference.A.displayB.indicateC.demonstrateD.appear上一题下一题(5/30)Vocabulary第5题This kind of material can______heat and moisture.A.deletepelC.constrainD.repel上一题下一题(6/30)Vocabulary第6题The river is already______its banks because of excessive rainfall, and the city is threatened with aA.parallel toB.level inC.flat onD.flush with上一题下一题(7/30)Vocabulary第7题The political future of the president is now hanging by a______.A.threadB.cordC.stringD.rope上一题下一题(8/30)Vocabulary第8题Half the profits are______in a corporate account that can be drawn on only with stockholder consent.A.investedB.depositedC.storedD.saved上一题下一题(9/30)Vocabulary第9题Mr. Robinson knew that the most trivial chore could prove to be a ______if approached with enthusiasm.A.prizeB.rewardC.refundD.bonus上一题下一题(10/30)Vocabulary第10题The speaker______us with tales of exotic lands and buried treasure.A.detouredB.offsetC.tantalizedhered上一题下一题(11/30)Vocabulary第11题Government loan have been the______of several shaky business companies.A.tornadoC.delinquencyD.momentum上一题下一题(12/30)Vocabulary第12题After a period of probation a______becomes a nun.A.sopranoB.hippieC.noviceD.monsieur上一题下一题(13/30)Vocabulary第13题While she had the fever, she______for hours.A.ravedB.sniggeredC.titteredD.perforated上一题下一题(14/30)Vocabulary第14题On August 18th the president announced a general______for political exiles.A.adoB.yogaC.quartetD.amnesty上一题下一题(15/30)Vocabulary第15题The scents of the flowers was______to us by the breeze.A.interceptedB.detestedC.saturatedD.wafted上一题下一题(16/30)Vocabulary第16题The plumb line is always perpendicular______the horizontal plane.A.withB.fromC.atD.to上一题下一题(17/30)Vocabulary第17题If it doesn´t rain within the next few weeks, the crops will have to be watered if they are______.A.to surviveB.to be survivedC.being survivedD.surviving上一题下一题(18/30)Vocabulary第18题She refused to______the car key to her husband until he had promised to wear his safety belt.A.hand inB.hand outC.hand downD.hand over上一题下一题(19/30)Vocabulary第19题______seen by anyone, the thief escaped.A.Being notB.Not beingC.To beD.Be not上一题下一题(20/30)Vocabulary第20题She keeps herself to herself. ______, she would be better married.A.To consider all thingsB.Considering all thingsC.All things consideredD.All things considering上一题下一题(21/30)Vocabulary第21题The fossilized remains of a type of camel______a dog have been found in the Badlands of South Dakota.A.no more larger thanB.not larger thanC.no larger thanD.which no larger than上一题下一题(22/30)Vocabulary第22题We are making good progress, but we must not______until we have achieved our objective.B.give upC.put upD.draw up上一题下一题(23/30)Vocabulary第23题Alexander Graham Bell invented______telephone in 1876.A./B.aC.oneD.the上一题下一题(24/30)Vocabulary第24题Perhaps the most significant postwar trend was the decentralization of cities throughout the United States, ______ when massive highway-building programs permitted greater suburban growth.A.and accelerated a phenomenonB.a phenomenon that acceleratedC.accelerating a phenomenon whichD.the acceleration of which phenomenon上一题下一题(25/30)Vocabulary第25题______by the United States government´s Bureau of Labor Statistics, the Consumer Price Index compares current costs of goods and services with past costs.A.To prepareB.As it preparedC.When preparationD.Prepared上一题下一题(26/30)Vocabulary第26题As the train will not leave until one hour later, we______grab a bite at the snack bar.A.may wellB.just as wellC.might as wellD.as well上一题下一题(27/30)Vocabulary第27题Just as the soil is a part of the earth, ______the atmosphere.A.as it isC.the same asD.and so is上一题下一题(28/30)Vocabulary第28题Our civilization cannot be thought of as______in a short period of time.A.to have been createdB.to be createdC.having been createdD.being created上一题下一题(29/30)Vocabulary第29题Their coach must______the team´s poor performance.A.answer forB.answer toC.answer backD.answer about上一题下一题(30/30)Vocabulary第30题Jean Wagner´s most enduring contribution to the study of Afro-American poetry is his insistence that it______in a religious, as well as worldly, frame of reference.A.is to be analyzedB.has been analyzedC.be analyzedD.should have been analyzed上一题下一题(31~35/共18题)Reading ComprehensionThe term "Ice Age" may give a wrong impression. The epoch that geologists know as the Pleistocene and that spanned the 1.5 to 2. 0 million years prior to the current geologic epoch was not one long continuous glaciation, but a period of oscillating climate with ice advances punctuated by times of interglacial climate not very different from the climate experienced now. Ice sheets that derived from an ice cap centered on northern Scandinavia reached southward to Central Europe. And beyond the margins of the ice sheets, climatic oscillations affected most of the rest of the world; for example, in the deserts, periods of wetter conditions(pluvials)contrasted with drier, interpluvial periods. Although the time involved is so short, about 0. 04 percent of the total age of the Earth, the amount of attention devoted to the Pleistocene has been incredibly large, probably because of its immediacy, and because the epoch largely coincides with the appearance on Earth of humans and their immediate ancestors.There is no reliable way of dating much of the Ice Age. Geological dates are usually obtained by using the rates of decay of various radioactive elements found in minerals. Some of these rates are suitable for very old rocks but involve increasing errors when used for young rocks;others are suitable for very young rocks and errors increase rapidly in older rocks. Most of the Ice Age spans a period of time for which no element has an appropriate decay rate.Nevertheless, researchers of the Pleistocene epoch have developed all sorts of more or less fanciful model schemes of how they would have arranged the Ice Age had they been in charge of events. For example, an early classification of Alpine glaciation suggested the existence there of four glaciations, named the Gunz, Mindel, Piss, and Wurm. This succession was based primarily on a series of deposits and events not directly related to glacial and interglacial periods, rather than on the more usual modern method of studying biological remains found in interglacial beds themselves interstratified within glacial deposits. Yet this succession was forced willy-nilly onto the glaciated parts of Northern Europe, where there are partial successions of true glacial ground moraines and interglacial deposits, with hopes of ultimately piecing them together to provide a complete Pleistocene succession. Eradication of the Alpine nomenclature is still proving a Herculean task.There is no conclusive evidence about the relative length, complexity, and temperatures of the various glacial and interglacial periods. We do not know whether we live in a postglacial period or an interglacial period. The chill truth seems to be that we are already past the optimum climate of postglacial time. Studies of certain fossil distributions and of the pollen of certain temperate plants suggest decreases of a degree or two in both summer and winter temperatures and, therefore, that we may be in the declining climatic phase leading to glaciation and extinction.第31题In the passage, the author is primarily concerned with______.A.searching for an accurate method of dating the Pleistocene epochB.discussing problems involved in providing an accurate picture of the Pleistocene epochC.declaring opposition to the use of the term "Ice Age" for the Pleistocene epochD.criticizing fanciful schemes about what happened in the Pleistocene epoch第32题The "wrong impression"(line 1.)to which the author refers is the idea that the______.A.climate of the Pleistocene epoch was not very different from the climate we are now experiencingB.climate of the Pleistocene epoch was composed of periods of violent stormsC.Pleistocene epoch consisted of very wet, cold periods mixed with very dry, hot periodsD.Pleistocene epoch comprised one period of continuous glaciation during which Northern Europe was covered with ice sheets第33题Which of the following does the passage imply about the "early classification of Alpine glaciation"?A.It should not have been applied as widely as it was.B.It represents the best possible scientific practice, given the tools available at the time.C.It was a valuable tool, in its time, for measuring the length of the four periods of glaciation.D.It could be useful, but only as a general guide to the events of the Pleistocene epoch.第34题The author refers to deserts primarily in order to______.A.support the view that we are probably living in a postglacial periodB.illustrate the idea that what happened in the deserts during the Ice Age had far-reaching effects even on the ice sheets of Central and Northern EuropeC.illustrate the idea that the effects of the Ice Age´s climatic variations extended beyond the areas of iceD.support the view that during the Ice Age sheets of ice covered some of the deserts of the world第35题The author would regard the idea that we are living in an interglacial period as______.A.unimportantB.unscientificC.self-evidentD.plausible上一题下一题(36~40/共18题)Reading ComprehensionInvestigators of monkeys´social behavior have always been struck by monkeys´aggressive potential and the consequent need for social control of their aggressive behavior. Studies directed at describing aggressive behavior and the situations that elicit it, as well as the social mechanisms that control it, were therefore among the first investigations of monkeys´social behavior.Investigators initially believed that monkeys would compete for any resource in the environment; hungry monkeys would fight over food, thirsty monkeys would fight over water, and, in general, any time more than one monkey in a group sought the same incentive simultaneously, a dispute would result and would be resolved through some form of aggression. However, the motivating force of competition for incentives began to be doubted when experiments like Southwick´s on the reduction of space or the withholding of food failed to produce more than temporary increases in intra-group aggression. Indeed, food deprivation not only failed to increase aggression but in some cases actually resulted in decreased frequencies of aggression.Studies of animals in the wild under conditions of extreme food deprivation likewise revealed that starving monkeys devoted almost all available energy to foraging, with little energy remaining for aggressive interaction. Furthermore, accumulating evidence from later studies of a variety of primate groups, for example, the study conducted by Bernstein, indicates that one of the most potent stimuli for eliciting aggression is the introduction of an intruder into an organized group. Such introductions result in far more serious aggression than that produced in any other types of experiments contrived to produce competition.These studies of intruders suggest that adult members of the same species introduced to one another for the first time show considerable hostility because, in the absence of a social order, one must be established to control interanimal relationships. When a single new animal is introduced into an existing social organization, the newcomer meets even more serious aggression. Whereas in the first case aggression establishes a social order, in the second case resident animals mob the intruder, thereby initially excluding the new animal from the existing social unit. The simultaneous introduction of several animals lessens the effect, if only because the group divides its attention among the multiple targets. If, however, the several animals introduced to a group constitute their own social unit, each group may fight the opposing groupas a unit; but, again, no individual is subjected to mass attack, and the very cohesion of the groups precludes prolonged individual combat. The submission of the defeated group, rather than unleashing unchecked aggression on the part of the victorious group, reduces both the intensity and frequency of further attack. Monkey groups therefore see to be organized primarily to maintain their established social order rather than to engage in hostilities per se.第36题The author of the passage is primarily concerned with______.A.advancing a new methodology for changing a monkey´s social behaviorparing the methods of several research studies on aggression among monkeysC.explaining the reasons for researchers´ interest in monkeys´ social behaviorD.discussing the development of investigators´ theories about aggression among monkeys第37题Which of the following best summarizes the findings reported in the passage about the effects of food deprivation on monkeys´ behavior?A.Food deprivation has no effect on aggression among monkeys.B.Food deprivation increases aggression among monkeys because one of the most potent stimuli for eliciting aggression is the competition for incentives.C.Food deprivation may increase long-term aggression among monkeys in a laboratory setting, but it produces only temporary increases among monkeys in the wild.D.Food deprivation may temporarily increase aggression among monkeys, but it also leads to a decrease in conflict.第38题The passage suggests that investigators of monkeys´social behavior have been especially interested in aggressive behavior among monkeys because______.A.aggression is the most common social behavior among monkeysB.successful competition for incentives determines the social order in a monkey groupC.situations that elicit aggressive behavior can be studied in a laboratoryD.most monkeys are potentially aggressive, yet they live in social units that could not function without control of their aggressive impulses第39题It can be inferred from the passage that the establishment and preservation of social order among a group of monkeys is essential in order to______.A.keep the monkeys from straying and joining other groupsB.prevent aggressive competition for incentives between that group and anotherC.prevent the domination of that group by anotherD.protect individuals seeking to become members of that group from mass attack第40题Which of the following best describes the organization of the second paragraph?A.A hypothesis is explained and counter evidence is described.B.A theory is advanced and specific evidence supporting it is cited.C.Field observations are described and a conclusion about their significance is drawn.D.Two theories are explained and evidence supporting each of them is detailed.上一题下一题(41~45/共18题)Reading ComprehensionIt is an unfortunate fact that most North Americans know little about American Indian culture and history. Scholars have studied such matters, but they have not succeeded in broadcasting their conclusions widely. Thus, it is still not widely known that American Indians have epics, that they performed plays long before Europeans arrived, and that they practiced politics and carried on trade.One way to gain a fuller appreciation of this rich culture is to examine American Indian poetry, for poetry is in all cultures the most central and articulate of the arts. It is especially important that we study American Indian poetry as this poetry can create a context that gives cohesive expression to the crafts, the artifacts, and the isolated facts that many Americans have managed to notice willy-nilly. Even a survey of American Indian poetry reveals a range of poetic thought and technique that defies easy generalization. Jarold Ramsey hazards a summary, however, which serves at least to give the uninitiated reader some sense of what American Indian poetry is like. Overall, he writes, it represents " an oral, formulaic, traditional, and anonymous art form," whose approach is to emphasize the "mythic and sacred" components of reality. It "flourished through public performances... by skilled recitalists whose audiences already knew the individual stories" and valued the performers for their "ability to exploit their material dramatically and to combine them[their stories]in longer cycles" rather than for their "plot invention. " Because this poetry belongs to highly ethnocentric tribal peoples, whose cultures " we still do not know much about," it " is likely to seem all the more terse, even cryptic.American Indian poetry has another feature that Ramsey ignores: it is always functional. Whether sung, chanted, or recited; whether performed ceremonially, as entertainment, or as part of a task such as curing a patient or grinding corn; or whether recited individually or by a group, it is always fully woven into the fabric of ordinary life.For complicated reasons, American Indian poetry has basically been ignored by non-Indian cultures. Kenneth Lincoln writes that failure to hear American Indian voices results " partly... from the tragedies of tribal dislocation, partly from mistranslation, partly from misconceptions about literature, partly from cultural indifference. " Brian Swann suggests an additional explanation; tribal poetry is oral, whereas Europeans arrived in the New World with a deeply ingrained belief in the primacy of the written word. As a result, European settlers found it hard to imagine that poetry could exist without written texts and thus that the American Indians had achieved something parallel to what Europeans called literature long before Europeans arrived. As a consequence, Europeans did not fully respond to the rich vitality of American Indian poetry.第41题According to the passage, American Indian cultures have produced all of the following forms of artistic expression EXCEPT______.A.craftsB.oral epicsC.songsD.written poems第42题According to Jarold Ramsey, American Indian poetry is an art form characterized by its______.A.unusual depictions of landscapesB.adaptability to public performanceC.universal accessibilityD.highly original plots第43题According to the passage, it would be unusual for American Indian poetry to be______.A.attributed to specific authorsB.sung by a group of performersC.chanted while workingD.sung during a sacred ceremony第44题It can be inferred from the passage that Brian Swann believes which of the following about the European settlers of America?A.They probably were more literate, on the average, than the general European population they left behind.B.They probably thought it necessary to understand American Indian politics before studying American Indian literature.C.They probably did not recognize evidence of an oral poetic tradition in the American Indian cultures they encountered.D.They probably could not appreciate American Indian poetry because it was composed in long narrative cycles.第45题Which of the following best describes the organization of the last paragraph of the passage?A.An observation is made and qualifications of it are provided.B.A phenomenon is noted and explanations for it are presented.C.A hypothesis is presented and arguments against it are cited.D.A prognosis is made and evidence supporting it is discussed.上一题下一题(46~48/共18题)Reading ComprehensionThere are two major systems of criminal procedure in the modern world-the adversarial and the inquisitorial. Both systems were historically preceded by the system of private vengeance in which the victim of a crime fashioned a remedy and administered it privately, either personally or through an agent.The modern adversarial system is only one historical step removed from the private vengeance system and still remains some of its characteristic feature. For example, even though the right to initiate legal action against a criminal has now been extended to all members of society(as represented by the office of the public prosecutor), and even though the police department has effectively assumed the pretrial investigative functions on behalf of the prosecution, the adversarial system still leaves the defendant to conduct his or her own pretrial investigation. The trial is viewed as a forensic duel between two adversaries, presided over by a judge who, at the start, has no knowledge of the investigative background of the case. In the final analysis the adversarial system of criminal procedure symbolizes and regularizes punitive combat.By contrast, the inquisitorial system begins historically where the adversarial system stopped its development. It is two historical steps removed from the system of private vengeance. From the standpoint of legal anthropology, then, it is historically superior to the adversarial system. Under the inquisitorial system, the public prosecutor has the duty to investigate not just on behalf of society but also on behalf of the defendant. Additionally, the public prosecutor has theduty to present the court not only evidence that would convict the defendant, but also evidence that could prove the defendant´s innocence. The system mandates that both parties permit full pretrial discovery of the evidence in their possession. Finally, an aspect of the system that makes the trial less like a duel between two adversarial parties is that the inquisitorial system mandates that the judge take an active part in the conduct of the trial, with a role that is both directive and protective.Fact-finding is at the heart of the inquisitorial system. This system operate on the philosophical premise that in a criminal action the crucial factor is the body of facts, not the legal rule(in contrast to the adversarial system), and the goal of the entire procedure is to attempt to recreate, in the mind of the court, the commission of the alleged crime.Because of the inquisitorial system´s thoroughness in conducting its pretrial investigation, it can be concluded that, if given the choice, a defendant who is innocent would prefer to be tried under the inquisitorial system, whereas a defendant who is guilty would prefer to be tried under the adversarial system.Questions:第46题According to the passage, what is the central distinction between the system of private vengeance and the two modern criminal procedure systems?(3 points)_____第47题What are characteristics of the inquisitorial system? Please make a brief summary.(4 points)____ 第48题What´s the author´s attitude towards the inquisitorial system?(3 points)____上一题下一题(1/1)Writing第49题Write an essay of about 400 words on the following topic____On Self-Confidence上一题交卷交卷答题卡答案及解析(1/30)Vocabulary第1题I hope you don´t think I´m______but I´ve had the electric fire on for most of the day.A.exquisiteB.extravagantC.exoticD.eccentric参考答案: B 您的答案:未作答答案解析:句意:我几乎一整天都开着电热炉,希望你不会觉得我很浪费。
北航2015年961真题
北京航空航天大学2015年硕士研究生入学考试试题科目代码:961计算机综合 (共8页)考生注意:所有答题务必书写在考场提供的答题纸上,写在本试题单上的答题一律无效(本题单不参与评卷)一、 单项选择(15道小题,每题2分,共30分)1、常见的几种总线仲裁方式中,对电路最为敏感的方式为()A、链式查询B、计数器查询方式C、独立请求D、中断查询2、在常用的I/O控制方式中,要求主存与I/O设备之间有直接数据通路的方式为()A、程序查询B、程序中断C、I/O通道D、DMA3、某机器字长为64位,内存容量为256MB,若按字编址,则其寻址空间为()A、0~8M-1B、0~16M-1C、0~32M-1D、0~64M-14、某机器字长为16位,内存按字编址,PC当前值为2000H,当读取一条双字长指令后PC的值为()A、2000HB、2004HC、2008HD、200AH5、某程序运行于一个由L1、L2两级cache以及主存组成的存储系统,L1 cache和L2 cache的命中率分别为50%和80%,则整个存储系统cache的命中率为()A、65%B、80%C、90%D、95%6、段式存储管理的逻辑地址空间为()A、一维线性的B、二维的C、三维的D、由操作系统决定的7、下列选项中,操作系统提供给用户的接口为()A、库函数B、中断C、系统调用D、驱动程序8、设某进程的页面走向为:5、4、3、2、4、3、1、4、3、2、1、5,系统中有3页物理内存,请问采用LRU和FIFO淘汰算法的缺页次数分别为()A、9和10B、5和7C、6和6D、8和109、进程可以使用的最大地址空间受限于()I.地址位数;II.物理内存大小;III.辅存大小A、IB、I和IIC、II和IIID、I,II,III10、有5个记录A,B,C,D,E存放在某磁盘的某磁道上,假定这个磁道划分为5块,每块存放一个记录,若磁盘旋转一周需要20ms,处理程序每读出一个记录后需要花费6ms进行处理,程序处理这些数据时磁盘照常旋转,按照()顺序存放这5个记录可以使其按照A,B,C,D,E顺序处理这些记录的时间最少。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
北航2015年考研991科目的答案
一、单项选择题
1.C 2.A 3.D 4.B 5.C 6.B 7.D 8.A 9.C 10.D 二、填空题
1.顺序2.O(m) 3.log2k+1 4.235 5.2(n-1) 6.该有向图中不存在回路7.2.9 8.m-1 9.插入排序法10.9
三、综合题
1.答:(1)多个堆栈共享一个连续的存储空间,可以充分利用存储空间,只有在整个存储空间都用完时才能产生溢出,其缺点是当一个堆栈溢出时需要向左、右栈查询有无空闲单元。
若有,则需要移动相应元素和修改相关的栈底和栈顶指针的位置。
当各个堆栈接近溢出时,查询空闲单元、移动元素和修改栈底栈顶指针位置的操作频繁,计算复杂,并且耗费时间。
(2)每个堆栈仅用一个顺序存储空间时,操作简便。
但难以确定初始分配存储空间的大小,空间分配少了,容易产生溢出,空间分配多了,容易造成空间浪费;并且各个堆栈不能共享空间。
(3)一般情况下,分别建立多个链接堆栈不考虑堆栈的溢出(仅受用户内存空间限制),缺点是堆栈中各元素要通过指针链接,比顺序存储结构多占用存储空间。
2.(T->lchild==NULL && T->rchild==NULL) T->lchild T->rchild
3.(由于图表显示限制,此题答案见指定教材(《数据结构教程第二版》(2012年4月第7次印刷)) 第418页8-16题)4.
(1).根据α=散列表中存入的元素数/散列表的长度,得到表的长度为18,因此,合适的散列函数应该为H(k)=k MOD 17。
(2).(由于图表显示限制,此题答案见指定教材(《数据结构教程第二版》(2012年4月第7次印刷)) 第428页9-15题)
四、算法设计题SORT(int A[ ], int n)
{ int ,i, j, min, max, temp; i=1;
while(i<=n/2){ min=i; max=i;
for(j=i+1;j<n-i+1;j++){ if(A[j]<A[min])
min=j; if(A[j]>A[max]) max=j;
} /* 确定某趟排序的最小值元素和最大值元素*/ if(min!=i){
temp=A[min]; A[min]=A[i]; A[i]=temp; } /* 交换A[min]与A[i]的位置*/ if(max!=n-i+1) if(max==i){
temp=A[min]; A[min]=A[n-i+1]; A[n-i+1]=temp; } /* 交换A[min]与A[n-i+1]的位置*/ else{
temp=A[max]; A[max]=A[n-i+1]; A[n-i+1]=temp; /* 交换
A[max]与A[n-i+1]的位置*/ } i++; } }
五、填空题
1.break a/q 2.a[n-1]>=a[n-2] FUNC2(a, n-1) 3.(*(a+i)+i) (*(a+i)+N-i-1) 4.i!=0 n%10+′0′5.ch-=30 ch-=26
6.*(s+i) t++ 7.strlen(p)-1 p<q 8.ch & 24 9.4 &number 10.argv[1],“rb”argv[2], “wb”
六、简答题
1.答:通常有下列三种方式:
(1)参数传递方式:函数调用时根据实参传递给形参内容的不同又分为值传递与地址传递两种。
(2) 通过return语句传递数据:被调用函数可以通过return语句将函数值传递给调用函数。
(3)利用全局变量传递数据。
2.答:指针可以进行下列三种运算:
(1) 指针加/减一个整数。
表示以当前指针所指单元的地址为起点的后或前整数个数据的地址。
(2) 指针减指针。
表示两个地址之间的数据个数。
(指针加指针为非法运算)(3) 比较。
表示同类型的两个指针所指对象在地址位置上的关系。
3.答:共用体具有以下三个特征:(1) 共用体变量的成员共用一块存储空间,共用体变量所占用的字节数等于最长成员所占用的字节数;(2) 共用体不能在定义时进行初始化;
(3) 共用体中的成员每次只能有一个起作用,当存入新成员时,原来的成员失效,其值被覆盖。
4.答:使用文件的基本操作一般有下列五个步骤:(1) 在程序中包含头文件stdio.h (2) 定义文件指针。
例如:FILE *fp;
(3) 打开文件,使文件指针与磁盘中的实际存储的数据文件建立关联。
例如:fp=fopen(“test.txt”, “r”); (4) 对文件进行读写操作。
例如:fread(f, 4, 2, fp);
(5)文件使用完毕后,关闭文件。
例如:fclose(fp);
七、程序设计题#include <stdio.h> main( )
{ int a[100], i, *p, k=0; p=a;
for(i=0; i<100; i++)
scanf(“%d”, p+i); /* 对数组进行数据输入*/
for(i=1; i<100; i++) /* 找出最小值元素,并记录其位置*/ if(*(p+k)>*(p+i)) k=i;
for(i=k; i<99; i++) /* 删除最小值元素*/ *(p+i)=*(p+i+1);
for(i=0; i<99; i++) /* 输出处理后数组各元素*/ printf(“%d”, *(p+i)); printf(“\n”); }
八、程序设计题函数的基本思想:
从左至右顺序扫描字符串s,逐个找出单词,并记录单词的开始位置与单词的长度;若该单词的长度比已找到的单词更长,则从左至右顺序扫描字符串t;当在字符串t中找到与在s
中找到的当前最长单词相匹配的单词时,记录单词的开始位置与单词的长度,并回到字符串s,在其中找出下一个更长的单词。
如此下去,只至字符串s扫描结束,最后返回相应结果。
#include <stdio.h> #include <string.h>
char *maxword(char *s, char *t) { char res, *temp, chs, cht; int i, j, found, maxlen=0; while(*s!=…\0‟), while(*s==… ‟)
s++; /* 过滤s中的空格*/
for(i=0; s*i+!=… ‟&&s*i+!=…\0‟; i++) /* 确定s中单词*/ if(i>maxlen), chs=s*i+; s*i+=…\0‟; temp=t; found=0;
while(*temp!=…\0‟&&!found), while(*temp==… ‟)
temp++; /* 过滤t中的空格*/
for(j=0;temp*j+!=… ‟&&temp*j+!=…\0‟;j++) /* 确定t中单词*/ if(j==i){
cht=temp*j+; temp*j+=…\0‟;
if(strcmp(s,
temp)==0){ maxlen=i; res=s; found=1 } temp=cht; }
temp=&temp[j]; /* 回到字符串t的某一位置*/ }
s[i]=chs; }
s=&s[i]; /* 回到字符串s的某一位置*/ }
if(maxlen==0)
return NULL; /* 未找到最长公共单词,返回NULL */ else{
res*maxlen+1+=…\0‟;
return res; /* 找到最长公共单词,返回该单词*/ } }。