2011年6月练习5
- 格式:doc
- 大小:59.50 KB
- 文档页数:7
委托加工物资及存货练习题【例题·单选题】(2015年)某企业收回委托加工应税消费品的材料一批,原材料的成本210万元,加工费10万元,增值税35.7万元,消费税1.7万元,收回的材料要连续生产应税消费品,这批材料的入账价值为(A)万元。
A.220B.221.7C.257.4D.255.7【例题·单选题】(2015年)2014年6月5日,甲公司委托某量具厂加工一批量具,发出材料的计划成本为80 000元,材料成本差异率为5%,以银行存款支付运杂费2 000元,6月25日以银行存款支付上述量具的加工费用20 000元,6月30日收回委托加工的量具,并以银行存款支付运杂费3 000元,假定不考虑其他因素,甲公司收回该批量具的实际成本是(D )元。
A.102 000B.105 000C.103 000D.109 000【例题·多选题】(2012年)某企业为增值税一般纳税人,委托其他单位加工应税消费品,该产品收回后继续加工,下列各项中,应计入委托加工物资成本的有(AB )。
A.发出材料的实际成本B.支付给受托人的加工费C.支付给受托方的增值税D.受托方代收代缴的消费税【例题·单选题】(2010年)甲公司为增值税一般纳税人,委托外单位加工一批应交消费税的商品,以银行存款支付加工费200万元、增值税34万元、消费税30万元,该加工商品收回后将直接用于销售。
甲公司支付上述相关款项时,应编制的会计分录是(B)。
A.借:委托加工物资264贷:银行存款264B.借:委托加工物资230应交税费——应交增值税(进项税额)34贷:银行存款264C.借:委托加工物资200应交税费64贷:银行存款264D.借:委托加工物资264贷:银行存款200应交税费64【例题·单选题】(2009年)甲、乙公司均为增值税一般纳税人,甲公司委托乙公司加工一批应交消费税的半成品,收回后用于连续生产应税消费品。
ERP原理与应用期末综合练习(2010年6月)为了帮助同学们进行期末复习,特拟定以下综合练习题,望同学们认真完成。
一、单项选择题1.最早提出ERP概念的咨询公司在(c )。
A.英国B.中国C.美国ffFdfvvv cCff D.印度2.时段MRP是在(b )学说的基础上形成的。
A.物料需求一天今天第一B.物料独立需求和相关需求C.物料独立需求D.物料相关需求3. MRPⅡ与MRP的主要区别就是它运用了(c )的概念。
A.会计B.成本会计C.管理会计D.财务管理4.业务流程重组是以作业流程为一天回家一趟中心、打破传统的金字塔形组织结构向平板形发展,即所谓的( b )结构管理。
A.垂直化B.扁平化C.职能化D.流程化5. 闭环MRP在时段MRP基础上添加了( d )。
A.库存需求计划B.生产计划C.采购需求计划太阳花一天D.能力需求计划6.下列选项中不属于ERP系统基本组成部分的是(a )。
A.工作流B.财务管理C.生产计划D.物流管理7. ERP思想的倡导者是( c ) 。
A.Oracle公司B.BAAN公司C.SAP公司D.用友公司8.一般来说,在生产型制造企一体化业的各项支出对利润的影响中,影响最大的是(b)。
A.销售成本B.采购成本C.存货成本D.生产成本9.ERP系统中的主业务流程包括( d )模块。
I.物流管理 II.财务管理后天然后他III.生产管理 IV.库存管理 V.采购管理A.II、III、IVB.I、II如果还让他好过、IVC.I、II、VD.I、II、III10.在易飞ERP系统中,记录企业向供应商询价结果的单据是(b )。
A.报价单B.询价单C.请购单D.采购单11. ERP系统的四个全景分别对应(c)四种管理。
A.供应链管理、库存管理、生产管理、财务管理B.库存管理、销售管理、采购管理、生产管理C.供应链管理、客户关系管理、产品生命周期管理和知识管理D.客户关系管理、供应商关系管理、内部人员管理、财务管理12.在易飞ERP系统中,属于售前服务阶段信息,记录了对客户的报价信息的是(b )模块。
1.甲公司5月15日出售A商品一批给乙公司,开具增值税专用发票注明价款50 000元,增值税8 500元,共计58 500元,乙公司开出一张为期3个月的商业承兑汇票一张抵付货款。
3个月后,票据到期,乙公司无力支付。
2.乙公司2012年9月1日销售一批B产品给甲公司,货已发出,增值税专用发票上注明的商品价款为100 000元,增值税款17 000元,当日收到甲企业签发的商业承兑汇票一张,期限6个月,到期收回款项。
3.2011年6月10日,企业因急需资金,将持有的一张面值为50 000元,期限为5个月的商业承兑汇票向银行贴现,年贴现率为7.2%,该汇票出票日为3月10日。
要求:计算到期值、贴现利息、贴现金额。
4.企业于7月10日销售乙商品一批,售价300 000元,增值税为51 000元,收到购货单位签发并承兑的商业承兑汇票一份,面值为351 000元,期限为6个月。
9月10日,该公司持该商业承兑汇票向银行申请贴现,年贴现利率为9%,不带追索权。
试计算贴现天数、贴现利息、企业贴现金额,并编制有关的会计分录。
5.某企业于2011年4月5日销售商品一批价款为300 000元,增值税率为17%。
收到期限为6个月的商业承兑汇票一张。
6月5日该企业因急需资金持此票据到银行贴现,贴现率为10%,带追索权。
该票据到期后,付款单位按期付款。
要求:计算贴现净值并编制销售产品、票据贴现、票据到期收回的会计分录。
6.某企业(一般纳税人,适用增值税税率为17%)销售给某小规模纳税人一批商品,开出普通发票价款为35 100元,收到期限为3个月的商业承兑汇票一张,带追索权。
企业因资金周转需要提前1一个月将该票据贴现,银行贴现年利率6%。
票据到期时,对方无力支付票款,本企业也存款不足。
要求:编制销售商品。
票据贴现、票据到期时的会计分录。
7..甲公司5月15日出售A商品一批给另一公司,开具增值税专用发票注明价款50 000元,增值税8 500元,共计58 500元,同时收到一张为期3个月的商业承兑汇票一张抵付货款,带追索权。
2023年6月英语四级语法练习及答案(1)1.Lung cancer, like some other cancers, often doesn’t produce ________ until it is too late and has spread beyond the chest to the brain, liver or bones.A) trailsB) therapiesC) symptomsD) symbols2.With the increasing unemployment rate, workers who are 50 to 60 years old are usually the first to be ________.A) laid offB) laid asideC) laid outD) laid up3.The physical differences between men and women can be ________ directly to our basic roles as hunters and child-bearers.A) pursuedB) tracedC) switchedD) followed4.It is clear that the dog has a much greater ________ of its brain devoted to smell than is the case with humans.A) compositionB) compoundC) percentD) proportion5.American college students are increasingly ________ with credit card debt and the consequences can be rather serious.A) boostedB) burdenedC) dischargedD) dominated1.答案:C参考译文:肺癌和其他癌症一样经常没有症状直到晚期扩散到脑、肝和骨头才会有症状产生。
【例题·判断题】(2008年考题)现金清查中,对于无法查明原因的现金短缺,经批准后应计入营业外支出。
()【例题·判断题】企业现金清查中,经检查仍无法查明原因的现金溢余,经批准后应冲减管理费用。
()【例题·计算分析题】(2009年考题)甲公司2008年12月份发生与银行存款有关的业务如下:(1)①12月28日,甲公司收到A公司开出的480万元转账支票,交存银行。
该笔款项系A公司违约支付的赔款,甲公司将其计入当期损益。
②12月29日,甲公司开出转账支票支付B公司咨询费360万元,并于当日交给B公司。
(2)12月31日,甲公司银行存款日记账余额为432万元,银行转来对账单余额为664万元。
经逐笔核对,发现以下未达账项:①甲公司12月28日收到的A公司赔款登记入账,但银行尚未记账。
②B公司尚未将12月29日收到的支票送存银行。
③甲公司委托银行代收C公司购货款384万元,银行已于12月30日收妥并登记入账,但甲公司尚未收到收款通知。
④12月份甲公司发行借款利息32万元,银行已减少其存款,但甲公司尚未收到银行的付款通知。
要求:(1)编制甲公司上述业务(1)的会计分录。
(2)根据上述资料编制甲公司银行存款余额调节表。
(答案中的金额单位用万元表示)【例题·多选题】(2008年考题)编制银行存款余额调节表时,下列未达账项中,会导致企业银行存款日记账的账面余额小于银行对账单余额的有()。
A.企业开出支票,银行尚未支付B.企业送存支票,银行尚未入账C.银行代收款项,企业尚未接到收款通知D.银行代收款项,企业尚未接到付款通知【例题·判断题】企业银行存款的账面余额与银行对账单余额因未达账项存在差额时,应按照银行存款余额调节表调整银行存款日记账。
()【例题·单选题】(2011年考题)企业将款项汇往异地银行开立采购专户,编制该业务的会计分录时应当()。
A.借记“应收账款”科目,贷记“银行存款”科目B.借记“其他货币资金”科目,贷记“银行存款”科目C.借记“其他应收款”科目,贷记“银行存款”科目D.借记“材料采购”科目,贷记“其他货币资金”科目【例题·多选题】下列各项,不通过“其他货币资金”科目核算的是()。
人教版三年级数学春季第十讲《年月日上》知识点1、月日总结:一三五七八十腊(12月)三十一天永不差四六九冬(11月)三十整平年二月二十八闰年二月二十九判断题:1.8月是大月√2.拳头记忆法中,关节凹下去的是大月×3.4月最后一天是4月31日√4.小月有30天√5.2月是大月. ×6.6月有30天√7.12月有4个星期零3天√8.6月有4个星期零3天×9.大月有()天 3110.1月有()天 31笔记部分:月、日一三五七八十腊(12月)三十一天永不差四六九冬(11月)三十整平年二月二十八闰年二月二十九例1、填空(1)一年有( )个大月、分别是( ),每月是( )天(2)一年有( )个小月分别是( ),每月是( )天.(3)爸爸连续出差两个月,正好是62天,那么是( )月和( )月或者( )月和( )月【答案】 (1)7,1月、3月、5月、7月、8月、10月、12月,31;练习1、猜生日连一连答案:例题2、观察月历回答问题1.这个月是()(填大或小)有()个星期六2.10月1日是国庆节,万圣节是10月31日,它们相差()填3.上个月的最后一天是()月()日,是星期()【答案】 (1)大,4;(2)30;(3)9,30,六【解析】(1)本月有31天,所以是大月,数一数有4个星期六: (2)同月份内日期可以直接相减,所以10月1日和10月31日相差了30天;(3)10月份的上月也就是9月份,有30天,所以最后一天是9月30日,10月1日是周日,所以9月30日是周六.练习2、判断正误(1) 二月是小月()(2)每年上半年的天数都一样多.( )(3)连续两个大月的只有七月和八月、( )(4)凡是单数的月份都是大月,( )(5)从劳动节到儿童节一共是31天.( )【答案】(1)×(2)×(3)×;(4)×;(5)x知识点2、认识平年和闰年2019年是平年还是闰年?2020年呢?提问:1900年是平年还是闰年呢?总结:四年一闰,百年不闰,四百年再闰。
2023年6月英语四级语法练习及答案(5)61. Output is now six times ________ it was before 1990.A) that B) whatC) for which D) of that62. The heavily populated area was a breeding place for ________ diseases.A) infectious B) powerfulC) influential D) suspicious63. It is unfortunate that, owing to lack of money, these experiments must now be ________ before the objective has been achieved.A) transferred B) testifiedC) terminated D) transformed64. The synthetic vitamins are identical ________ those naturally present in our food.A) for B) of C) as D) with65. Just as a book is often judged ________ by the quality and appearance of its cover, a person is judged immediately by his appearance.A) previously B) uniquely C) outwardly D) initially66. Recycling wastes slows down the rate ________ which we use up the Earth’s finite resources.A) In B) of C) with D) at67. Gasoline is ________ by the spark plugs in the engine.A) ignited B) inspired C) excited D) illuminated68. He ________ another career but, at the time, he didn’t have enough money to attend graduate school.A) might have chosen B) might chooseC) had to choose D) must have chosen69. Many visitors praised the magnificent architecture of the Palace, ________.A) known to foreigners for the Forbidden CityB) known for foreigners to be the Forbidden CityC) known to foreigners as the Forbidden CityD) know for foreigners as the Forbidden City70. The travelers ________ their journey after a short break.A) recovered B) resumed C) renewed D) restored61. B 62. A 63. C 64. D 65. C66. D 67. A 68. A 69. C 70. B。
人教版三年级下册数学《年月日》六大类应用题专项练习(含答案)计算经过的天数计算经过的天数,关键是:先确认开始日期和结束日期,找到从几日到几日。
公式:经过天数=结束日期-减开始日期+1(如果跨月,要分段计算各月天数,再加起来)例1:爸爸5月3日到5月28日要出差,爸爸一共出差多少天?分析:爸爸的出差日期是从5月3日到5月28日,5月3日是开始时间,5月28日是结束时间,用公式经【过天数=结束日期-减开始日期+1】计算即可。
28-3+1=26(天)答:爸爸一共出差26天。
例2:学校7月4日放暑假,9月1日开学,暑假一共有多少天?分析:暑假是从7月4日开始到8月31日结束,需要分月统计,先计算7月天数,再计算8月天数,再相加。
7月:4日-31日,31-4+1=28(天)8月:31天(整月是几月就对应多少天)总天数:28+31=59(天) 答:暑假一共有59天。
例3:一个蛋糕的保质期是5天,生产日期是2021年12月4日,哪一天过期?分析:保质期1天,就在生产日期后加1天,公式【生产日期+保质期天数】。
这个蛋糕是4日生产的,保质期有5天,即4+5=9,9日是保质期的最后一天, 10日就过期了。
例4:小林家的洗衣机是2015年3月15日买的,保修期为2年,能保修到哪一年的3月15日?分析:保修期1年,就在购买年份上加1年,公式【购买年份+保修期年数】。
洗衣机是2015年购买,保修期为2年,就是2015+2=2017,所以保修到2017年的3月15日。
计算有多少个星期计算有多少个星期(关键:先算一共多少天,再用天数÷7,答案就是商)例题:一年最多多少周?分析:一周有7天,就是求一年里有多少个7天,用除法。
但是这道题没有说明这一年是平年还是闰年,所以我们要把平年和闰年的周数分别计算出来再判断。
平年有365天,算式为:365÷7=52(周)……1(天)平年有366天,算式为:366÷7=52(周)……2(天)全年最多52周。
2023年6月英语六级词汇选择模拟练习1.2023年6月英语六级词汇选择模拟练习篇一1.____native to North America, corn has now spread all over the world.A. In spite ofB. That it isC. It wasD. Although2. 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 created3. We feel it is high time that the Government ____something to check the inflation.A. didB. doC.should doD. would do4. It has been proposed that we____our decision until the next meeting.A.delayedB.delayC. can delayD. are to delay5. Hurricanes are severe cyclones with winds over seventy five miles anhour ____originate over tropical ocean waters.A. whichB. whoC. whereD.how to6.____is announced in the papers, our country has launched a large scale movement against smuggling and fraudulent activities in foreign currency exchange deals.A. WhatB. AsC. WhichD. That7. All the flights____because of the snowstorm, we had to take the train instead.A.were canceledB. had been canceledC. having canceledD. having been canceled8. Once ____, this power station will supply all the neighboring towns and villages with electricity.A. it being completedB. it completedC. completedD. it completes9. He might have been killed ____the timely arrival of the ambulance.10. If you have never planted anything, you won’t be able to know the pleasure of watching the thing you have planted ____.A.growB. to growC. growingD. to be growing11. He did me a ____turn by lending me ten pounds.A. goodB. niceC. fineD. pretty12. Once our chickens started laying eggs, we had such a ____of eggs that we were giving many away to our neighbors.A. outputB. surplusC. productionD. plenty13. Following are comments about the behavior that people in Korea usually expect in various social ____.A. occasionsB. casesC.situationsD. circumstances14. They have considered their high standard of living a(n)____for practising their basic beliefs.A. awardB. rewardC. resultD. consequence15. Mac’s close____to his brother made people mistake them for one another.A. resemblanceB. identityC. appearanceD. relationship16. The thieves____the waste paper all over the room while they were searching for the diamond ring.A. spreadB. scratchedC.scatteredD. burned17. The sight of the fruit salad made our daughter Kit’s mouth____.A. wetB. waterC. soakD. taste18. The____problem of bring a space ship back from the moon has been solved.A. technicalB. technologicalC. techniqueD. technology19. A large part of a person’s memory is____words and combination of words.A.by means ofB. in terms ofC. in connection withD. by way of20. At her word she stood up and walked away, stopping at the window to pull back the curtain and ____.A.look roundB. look outC. look upD. look on2.2023年6月英语六级词汇选择模拟练习篇二1. He did me a ____turn by lending me ten pounds.A. goodB. niceC. fineD. pretty2. Once our chickens started laying eggs, we had such a ____of eggs that we were giving many away to our neighbors.A. outputB. surplusC. productionD. plenty3. Following are comments about the behavior that people in Korea usually expect in various social ____.A. occasionsB. casesC.situationsD. circumstances4. They have considered their high standard of living a(n)____for practising their basic beliefs.A. awardB. rewardC. resultD. consequence5. Mac’s close____to his brother made people mistake them for one another.A. resemblanceB. identityC. appearanceD. relationship6. The thieves____the waste paper all over the room while they were searching for the diamond ring.A. spreadB. scratchedC.scatteredD. burned7. The sight of the fruit salad made ou r daughter Kit’s mouth____.A. wetB. waterC. soakD. taste8. The____problem of bring a space ship back from the moon has been solved.A. technicalB. technologicalC. techniqueD. technology9. A large part of a person’s memory is____words and combination of words.A.by means ofB. in terms ofC. in connection withD. by way of10. At her word she stood up and walked away, stopping at the window to pull back the curtain and ____.A.look roundB. look outC. look upD. look on3.2023年6月英语六级词汇选择模拟练习篇三1.With the _______of Mary, all the girl students are eager to go to the party.A.exhibitionB.exceptionC.exceptD.reception2.Although the trffic is not busy, he likes to drive at a _______ speed.A.spareB.fastC.moderateD.moral3.All the memories of his childhood had _______ from his mind by the time he was 65.A.fadedB.illustratedfinedD.concerned4.This river is so big that it is impossible to build a _______ under it without modern technology.A.canalB.tunnelC.channelD.cable5.The _______ is nearly dead , so I can not start the car again.A. beanB.beamC.bakeD.battery6.When making modern cameras , people began to _______ plastics for metal.A. surroundB.substanceC.stretchD.substitute7.With the help of the government , a large number of people ---_______ after the flood in 1991.A. survivedB.suspendedC.sufferedD.subfected8.He always has a lot of _______ ideas in his mind , and sometimes we do not even know what he is thinding about.A. novelB.spoilC.acceptableD.additional9.Please be serious. I am not _______. You should consider it carefullyA. sortingB.jokingC.countingparing10.We do not have a _______ school in our institute. The highest degree we provide for the students is a B. A. and a B. S. .A. continueB.bayC.assistanceD.graduate。
一、单项选择题1.队列是一种的线性表。
A. 允许在表中任何位置进行插入和删除B. 只允许在表中一端进行插入和删除C. 只允许在表中一端进行插入,在另一端进行删除D. 允许在表中两端进行插入和删除2.如果一个栈的进栈序列是abcd(先a进栈,然后是b ,c和d依次进栈),允许在进栈过程中可以退栈,且规定每个元素进栈和退栈各一次,那么不可能得到的退栈序列是。
A. dcbaB. acbdC. dbacD. cdba3.若某线性表中最常用的操作是在最后一个元素之后插入一个元素和删除第一个元素,则采用存储方式最节省运行时间。
A. 单链表B. 仅有头指针的单循环链表C. 双向链表D. 仅有尾指针的单循环链表4.对于任何一棵二叉树,若叶子结点个数为n0 ,度次数为2的结点个数为n2,则n0=。
A. n2 -1B. n2C. n2 +1D. 2* n25.先序为a ,b , c , 且后序为c ,b , a , 的二叉树共有棵。
A. 1B. 2C. 3D. 46.如果G是一个具有n(n>1)个顶点的连通无向图,T是G的一棵生成树,那么T有条边。
A. n – 1B. nC. n + 1D. n – 27.对于链式存储的线性表。
A.可采用顺序查找,但不可采用二分查找B.可采用二分查找,但不可采用顺序查找C.顺序查找和二分查找均可采用D.顺序查找和二分查找均不可采用8.对有14个元素的有序表A[1..14]作二分法查找,查找元素A[4]时的被比较元素依次为。
A. A[1], A[2],A[3],A[4]B. A[1], A[14],A[7],A[4]C. A[7], A[3],A[5],A[4]D. A[7], A[5], A[3], A[4]9.下列排序算法中,()排序在每趟结束后不一定能选出一个元素放到其排好序的最终位置上。
A. 选择B. 冒泡C. 归并D. 堆10.以下的叙述中,是正确的。
A.冒泡排序是一种特殊的插入排序B.数据的逻辑结构不是按其在计算机中的存储表示方法来区分的C.顺序存储的线性表称为链表D.每个结点的度数都小于等于2的树是二叉树二、回答问题1.算法是对特定问题求解步骤的一种描述,它具有哪些重要特性?2.在执行下面程序段时,语句S的执行次数为多少?For i:= 1 to n - 1 doFor j:= n downto i do3.已知一棵二叉树的后序遍历为:CDBGHFIEA,中序遍历为:CBDAGFHEI,试画出此二叉树的先序线索二叉树。
4.已知图的邻接矩阵为:V1 V2 V3 V4 V5 V6 V7 V8V1 0 1 1 1 0 0 0 0V2 0 0 1 0 0 1 0 0V3 0 0 0 0 1 0 0 0V4 0 0 0 0 0 0 1 0V5 0 0 0 0 0 0 1 1V6 0 0 0 0 1 0 0 1V7 0 0 0 0 0 0 0 0V8 0 0 0 0 0 0 0 0若在它的邻接表存储结构中,每个顶点的邻接点序号是从小到大链接时,写出其唯一的拓扑有序序列。
5.设有哈希函数为H(key)= Key MOD 11,哈希表HT和长度为11,解决冲突的方法为线性探测再散列法,关键字的输入序列为(18,34,58,26,75,67,48,93,81)试构造此哈希表,并求出在等概率情况下的平均查找长度。
三、改错题(在错误位置处下方划一横线并将正确语句写在右边。
只画横线,不写正确语句的该题无分;只写正确语句不画横线,该题只得3分)1.本算法的功能是,在双向链表中p结点之前插入数据值为b的s结点。
双向链表的类型定义为:TYPE dulink =↑dunodetp;dunodetp = recorddata: integer;priou,next:dulinkend;proc exam31 ( p:dulink );new(s); s↑·data:= b;p↑·priou:= s; s↑·priou:= p↑·priou;s↑·next:= p; p↑·priou↑·next:= sendp;2.本算法的功能是,在静态存储结构的串s的第start位置起插入一个串t。
CONST maxlen = {串的最大长度}TYPE strtp = recordch: array[1..maxlen] of char;curlen: 0..maxlenend;proc exam32 (VAR s:strtp; t:strtp; start:integer);if (s·curlen + t·curlen > maxlen) or (start > s·curlen + 1)then error (‘out of range’)else [ for i:=start to s·curlen dos·ch [i + t·curlen]:=s·ch [i];for i:=1 to t·curlen dos·ch [start + i – 1]:=t·ch [i];s·curlen:=s·curlen + t·curlen ]endp;3.本算法的功能是,一棵以二叉链表作为相信存储结构的二叉树上,回收二叉树上的所有结点。
TYPE bitreptr = ↑bnodetp;bnodetp = recorddata:char;lchild, rchild:bitreptrend;proc exam33 (VAR p:bitreptr);{p根结点的指针}if p <> nilthen [ exam33 (p↑·lchild);dispose (p);exam33 (p↑·rchild) ]endp;4.本算法的功能是,在一组关键字按从大到小的次序排列的记录r[1..n]上,用二分法查找给定值。
Func exam34 (r:ordlisttp; k:keytype):integer;low:= i; hig:= n;while low to hig do(mid:= low – hig) div 2casek > r[mid]·key; low:= mid + 1;k = r[mid]·key; return (mid);k < r[mid]·key; hig:= mid – 1end ];return (0)endf;四、阅读算法,写出其运行结果。
1.TYPE link = ↑nodetp;nodetp = recorddata: char;next: linkend;procedure exam41 (var head: link);p:= nil;q:= head;while q <> nil do[ r:= q↑·next;q↑·next:= p;p:= q;q:= r];head:= pendp;如果已知带表头结点线性链表head中各结点的数据依次为L,E,V,E,L,R,O,R,则运行此算法后,线性链表中各结点的数据值依次为。
2.CONST maxlen=30;TYPE sqlisttp = recordelem: array [ 1 .. maxlen] of integer;last: 0 .. maxlenend;procedure exam42 (var L: sqlisttp);j:= 1;i:=2;while i <= L·last do[ if L·elem[i] <> L·elem[j]then [j:= j + 1;L·elem[j]:=L·elem[i] ];i:= i + 1 ];L·last:= jEndp;如果顺序存储线性表中依次存放的数据为:23,7,7,35,18,46,46,7,18,18,试画出调用此小程序后的顺序存储线性表L。
3.TYPE thlinktp = ↑thnodetp;thnodetp = recorddata: char;ltag, rtag: 0..1;lchild, rchild: thlinktpend;proc exam43 ( V AR p: thlinktp ); {p为根结点的指针}if p <> nilthen [ exam43 ( p↑·lchild );exam43 ( p↑·rchild ) ;if p↑·rchild = nil then p↑·rtag:= 1;if (pre <> nil) and(pre↑·rtag = 1)then pre↑·rchild:= p;pre:= p ]endp;题中,pre是前趋结点的指针,当二叉树为第二题中的第3小题所画的二叉树时,试画出执行本算法的输出结果。
4.Proc exam44 (VAR r:filetype; s,t:integer; VAR i:integer);{其中,r是一组记录,下标范围为[s..t]}i:=s; j:=t; x:=r[i];while i < j do[ while (i<j) and (r[j]·key >= x·key) do j:=j – 1;if i < j then [r[i]:=r[j]; i:= i + 1];while (i<j) and (r[i]·key <=x·key) do i:= i + 1;if i < j then [r[j]:=r[i]; j:= j - 1] ];r[i]:= xendp;当一组记录r[s..t]的关键字值为(54,38,96,23,15,72,60)时,调用此算法后,写出该组记录关键字值的变化过程和结果。
五、编写算法题(阅读算法,填充空格,使其成为完整的算法)1.本算法的功能是,在二叉树以二叉链表作为存储结构时,显示输出中序遍历二叉树的最后一个结点。
TYPE bitreptr =↑bnodetp; {二叉树的类型定义}bnodetp = recorddata:char;lchild,rchild:bitretrend;proc exam51 (bt:bitreptr; VAR p:bitreptr);{bt为根线点的指针}p:=bt;while (1) do (2) ;write (p↑·data)endp;(1) (2)2. 本算法的功能是,在输入数据无序情况下,建立一数据值递增有序的顺序存储线性表,且表中数据值各不相同。