2010年上半年程序员上午试题答案

合集下载

2010年上半年软考网络工程师试题、答案与解析(完全版)免费

2010年上半年软考网络工程师试题、答案与解析(完全版)免费

试题解析:A、C首先可以排除,因为它们是deny。

扩展ACL命令的格式如下:答案:(42)B试题解析:这道题出得让人无法适从。

DES是一个分组加密算法,它以64位为分组对数据加密。

同时DES也是一个对称算法,即加密和解密用的是同一个算法。

它的密钥长度是64位,但实际有效的密钥只是56位,这是因为密钥中每8位就有1位用作奇偶校验。

DES的分组长度太短(仅64位)、密钥长度更短(仅56位),可以通过穷举(也称野蛮攻击)的方法在较短时间内破解。

1978年初,IBM意识到DES的密钥太短,于是设计了3DES(Triple DES),利用三重加密来有效增加密钥长度,加大解密代价。

3DES 是DES算法扩展其密钥长度的一种方法,它需要执行三次常规的DES加密,这相当于将加密密钥的长度扩展到128位(112位有效)或192位(168位有效)。

3DES有3种不同的加密模式(E代表加密,D代表解密):λ1、DES-EEE3,使用3个不同的密钥进行三次加密,这相当于将密钥扩展为192位。

λ2、DES-EDE3,使用3个不同的密钥,分别对数据进行加密、解密、加密操作,这也相当于将密钥扩展为192位。

λ3、DES-EEE2和DES-EDE2,与前面模式相同,只是第一次和第三次加密使用同一密钥,这相当于将密钥扩展为128位。

A、B肯定是错的,C和D都有可能。

DES-EEE3和DES-EDE3采用了三个不同的密钥,而DES-EEE2和DES-EDE2采用了两个不同的密钥。

建议选择C、D的都算对。

答案:(43)C(D也算对)试题解析:IIS 提供多种身份验证方案:匿名访问:如果启用了匿名访问,访问站点时,不要求提供经过身份验证的用户凭据。

集成Windows 身份验证:以前称为NTLM 或Windows NT 质询/响应身份验证,此方法以Kerberos 票证的形式通过网络向用户发送身份验证信息,并提供较高的安全级别。

Windows 域服务器的摘要式身份验证:摘要式身份验证需要用户ID 和密码,可提供中等的安全级别,如果您要允许从公共网络访问安全信息,则可以使用这种方法。

【精辟完整】软件设计师上午和下午考试真题及答案解析(2010年)

【精辟完整】软件设计师上午和下午考试真题及答案解析(2010年)

上午考试试题1.在输入输出控制方法中,采用(1)可以使得设备与主存间的数据块传送无需CPU干预。

(1)A.程序控制输入输出 B.中断 C.DMA D.总线控制2.若某计算机采用8位整数补码表示数据,则运算(2)将产生溢出。

(2)A.-127+1 B.-127-1 C.127+1 D.127-13.若内存容量为4GB,字长为32,则(3)。

(3)A.地址总线和数据总线的宽度都为32 B.地址总线的宽度为30,数据总线的宽度为32C.地址总线的宽度为30,数据总线的宽度为8D.地址总线的宽度为32,数据总线的宽度为8(地址单元为0000H~3FFFH,每个芯片的地址空间连续),则4.设用2K×4位的存储器芯片组成16K×8位的存储器地址单元0B1FH所在芯片的最小地址编号为(4)。

(4)A.0000H B.0800H C.2000H D.2800H5.编写汇编语言程序时,下列寄存器中程序员可访问的是(5)。

(5)A.程序计数器(PC)B.指令寄存器(IR)C.存储器数据寄存器(MDR)D.存储器地址寄存器(MAR)6.正常情况下,操作系统对保存有大量有用数据的硬盘进行(6)操作时,不会清除有用数据。

(6)A.磁盘分区和格式化 B.磁盘格式化和碎片整理 C.磁盘清理和碎片整理 D.磁盘分区和磁盘清理7.如果使用大量的连接请求攻击计算机,使得所有可用的系统资源都被消耗殆尽,最终计算机无法再处理合法用户的请求,这种手段属于(7)攻击。

(7)A.拒绝服务 B.口令入侵 C.网络监听 D.IP欺骗8.ARP攻击造成网络无法跨网段通信的原因是(8)。

(8)A.发送大量ARP报文造成网络拥塞 B.伪造网关ARP报文使得数据包无法发送到网关C.ARP攻击破坏了网络的物理连通性D.ARP攻击破坏了网关设备9.下列选项中,防范网络监听最有效的方法是(9)。

(9)A.安装防火墙 B.采用无线网络传输 C.数据加密 D.漏洞扫描10.软件商标权的权利人是指(10)。

最全历年程序员软考考试上午真题合集(附答案)

最全历年程序员软考考试上午真题合集(附答案)

最全历年程序员软考考试上午真题合集(附答案)申明:此为上半年⾄今的所有程序员软考上午试题真题并且每套后⾯均配有答案,接近30套,每年两套。

由于⽂件过⼤,拆成上午试题和下午试题,在百度⽂库同样可以搜索“最全历年程序员软考考试下午真题合集“。

此外还有模拟试题提供,百度⽂库搜索“最全程序员软考考试上午模拟试题合集”和“最全程序员软考考试下午模拟试题合集”。

注:如果图⽚显⽰不全,适当将图⽚缩⼩即可。

初级程序员上半年上午试题⾯向对象程序设计以 1 为基本的逻辑构件,⽤ 2 来描述具有共同特征的⼀组对象,以 3 为共享机制,共享类中的⽅法和数据。

1、A.模块 B.对象 C.结构 D.类2、A.类型 B.抽象 C.类 D.数组3、A.引⽤ B.数据成员 C.成员函数 D.继承4、链表不具备的特点是______。

A.可随机访问任何⼀个元素 B.插⼊、删除操作不需要移动元素C.⽆须事先估计存储空间的⼤⼩ D.所需存储空间与线性表长度成正⽐5、矩阵压缩存储的主要⽬的是______。

A.⽅便运算 B.节省存储空间C.降低计算复杂度 D.提⾼运算效率6、判断“链式队列为空”的条件是______(front为头指针,rear为尾指针)。

A.front==NULL B.rear==NULLC.front==rear D.front!=rear7、以下关于字符串的判定语句中正确的是______。

A.字符串是⼀种特殊的线性表 B.串的长度必须⼤于零C.字符串不属于线性表的⼀种 D.空格字符组成的串就是空串8、在具有100个结点的树中,其边的数⽬为______。

A.101 B.100 C.99 D.989、程序设计语⾔的定义⼀般包括______⼏个⽅⾯。

A.语法、语义和语句 B.语法、语义和语⽤C.语义、语句和语⽤ D.语法、语⽤和语句10、在C语⾔中,若函数调⽤时实参是数组名,则传递给对应形参的是______。

A.数组空间的⾸地址 B.数组的第⼀个元素值C.数组中元素的个数 D.数组中所有的元素在下⾯的程序中,若实参a与形参x以引⽤调⽤(call by reference)的⽅式传递信息,则输出结果为 11 ;若实参a与形参x以值调⽤(call by value)的⽅式传递信息,那么输出结果为 12 。

2010年上半年软考软件设计师考试试题及答案

2010年上半年软考软件设计师考试试题及答案

试题一(共15 分)阅读下列说明和图,回答问题1至问题4,将解答填入答题纸的对应栏内。

【说明】某大型企业的数据中心为了集中管理、控制用户对数据的访问并支持大量的连接需求,欲构建数据管理中间件,其主要功能如下:(1)数据管理员可通过中间件进行用户管理、操作管理和权限管理。

用户管理维护用户信息,用户信息(用户名、密码)存储在用户表中;操作管理维护数据实体的标准操作及其所属的后端数据库信息,标准操作和后端数据库信息存放在操作表中;权限管理维护权限表,该表存储用户可执行的操作信息。

(2)中间件验证前端应用提供的用户信息。

若验证不通过,返回非法用户信息;若验证通过,中间件将等待前端应用提交操作请求。

(3)前端应用提交操作请求后,中间件先对请求进行格式检查。

如果格式不正确,返回格式错误信息;如果格式正确,则进行权限验证(验证用户是否有权执行请求的操作),若用户无权执行该操作,则返回权限不足信息,否则进行连接管理。

(4)连接管理连接相应的后台数据库并提交操作。

连接管理先检查是否存在空闲的数据库连接,如果不存在,新建连接;如果存在,则重用连接。

(5)后端数据库执行操作并将结果传给中间件,中间件对收到的操作结果进行处理后,将其返回给前端应用。

现采用结构化方法对系统进行分析与设计,获得如图1-1所示的顶层数据流图和图1-2所示的0层数据流图。

【问题1】(3 分)使用说明中的词语,给出图1-1中的实体E1~E3的名称。

【问题2】(3 分)使用说明中的词语,给出图1-2中的数据存储D1~D3的名称。

【问题3】(6 分)给出图1-2中加工P 的名称及其输入、输出流。

除加工P 的输入与输出流外,图1-2还缺失了两条数据流,请给出这两条数据流的起点和终点。

注:名称使用说明中的词汇,起点和终点均使用图1-2中的符号或词汇。

【问题4】(3 分)在绘制数据流图时,需要注意加工的绘制。

请给出三种在绘制加工的输入、输出时可能出现的错误。

2010年上半年软考数据库系统工程师试题及答案(上午)在线

2010年上半年软考数据库系统工程师试题及答案(上午)在线

The technology of NGN (next generation network) *One, NGN definitionIn February 2004, ITU-T SG13 meeting after a heated debate, gives the definition of NGN, NGN is a packet network, it provides a variety of business including telecommunications, business, can use of bandwidth and has the ability of the QoS transmission technology, achieve business function and the bottom of the transmission technology separation; It allows users to different service provider network free access, and support the general mobility, realize the user to the business use consistency and uniformity.(1) the basic characteristics of NGN·packet transmission;·control function from carrying, call/conversation, application/business separation; ·business provides and network separation, provide open interface;·the basic business use of modules, offer a wide range of business and application (including real-time, flow, the real-time and multimedia business);·has end-to-end QoS and transparent transmission ability;·through open communication interface and traditional network;·with general mobility;·allows users to free to access the different business provider,·support variety identification system, and its analytical for IP address to IP network routing; ·the same business to have unified business character;Fixed and mobile business, mixing together;·business function independent of the bottom transmission technology;·adapt to all management requirements, such as emergency communications and security and privacy requirements, etc.(2) the ability of NGN·business development, deployment with various business and management ability; ·business and network of separation, enabling the network and business can be independent development evolution,·each function entity in the existing or new network distribution of existing network with the implementation of the ability;·support existing and new variety of terminal of NGN;·of existing business to provide voice the transition of the key technology of NGN support; ·support general mobility, has the user access independence and business use of the consistency of the characteristics.(3) NGN goalThe goal is to meet NGN new communication demand to promote fair competition, encourage private investment, definitions meet all kinds of management requirements of the communication system structure and provide open network access method.(4) NGN field of study·NGN general frame model;·NGN function system structure model;·end-to-end business quality (QoS);·business platform (APIs);·network management;·security;·general mobility;·network control system and the agreement;·business capability and business system structure;·NGN in business and nets interoperability between;·Numbers, name and addressing.*Two, NGN business requirementsNGN requirements to support real-time business and the real-time business, communication and customer support equivalence type-service ware communication, support users and mobile users fixed access, so at least have the following business ability NGN: authority, the authentication, offline or online billing, orientation, and strategic control, conversation processing, carrier, information exchange, provide. In addition, NGN should have the ability to negotiate IP multimedia applications, defining and choose IP multimedia conversational media available components and resources, QoS, etc.; Should have fast business generation and configuration ability, make some application and related technology should not wait for the standardization can effectively in the network configuration.*Three, NGN network requirementsThe increase of the function and NGN business requirements needed to develop the corresponding network conditions to support, therefore, the network structure, network technology and control management are put forward new requirements. NGN structure should independent of specific application and on the function separation, at present more consistent division is divided into transmission plane, conversation and call control plane, application plane and management level. NGN should also offers a variety of access types, such as XDSL, Cable, Ethernet, WLAN, cellular wireless access, etc.In the interoperability, NGN should support and the existing fixed/mobile voice and data network interoperability, including PSTN, ISDN, 2 G and 3 G mobile network, Internet,. In mobility, NGN to support the user and terminal of the roaming and nomadic sex, provide the user and terminal of the registered function and mobility management function, to identify users profile and build user database for roaming user provide different network and access technology of seamless over mechanism. In safety, NGN network and with other users to establish a trust relationship between, has for their identification and jian right ability, can at any time to verify user identity, and checking if users have to use resources and access business right; From the user's perspective, users should be able to identify the network. In the QoS, NGN should provide domain and cross-realm end-to-end QoS; QoS system to support many management domain and independent of various access technology; Support the access control based on measurement and congestion control; Based on the use of an support and billing. In the user networks, NGN user network should be able to for a IP multimedia sessions or a single media stream sure an optional destination, and shall have the right to launch to other destinations in the turn, The user can parallel to run multiple multimedia conversational and at any time suspend, continue to and the ending of the conversation. In the OAM, NGN to offer a variety of technical and business management function, both must support segmentation of OAM and to support end-to-end OAM; Support layer between the OAMinteroperability; In addition to the protection of the uninterrupted and heavy routing ability also set the new request.*Four, NGN mobility managementMobility is to point to to users and change the position of the terminal and continuous access service, continue to communication ability. Mobility can be divided into two levels: one is called "nomad" mobility, that users are mobile can change its network access points, but ongoing service session will cease, need to restart; Another called seamless mobility, refers to, when a user or terminal mobile, can at any time change its network access point and not interrupt ongoing service session. These are the requirements in the core network to provide corresponding function to support mobility, these functions should include user identification, authorized, position, update, users of information such as download, called mobility management. For users and terminal mobility management to ensure that provide different network roaming and services between the seamless mobility is one of the most pressing needs NGN. From the user's point of view, the user should can be marked as mobile users or fixed users; Should be able to access the network from any network access points, including the use of any access technology in user's web roam between, and the user the validity and reliability for network function should be known.According to NGN network topology, NGN of mobility management can classified as: network management between mobility, it basically is to solve different NNI mobility management problems between NGN; Net mobility management, it basically is to solve the NNI mobility management in NGN; The mobility of access network management, it basically is to solve the problem in the access of mobility. Because of the solution to the problem of different emphases, these three categories of mobility management requirements are different. Access network management in because its the same mobility access technology and membership the same operators and relatively simple, to net mobility management as such. And nets associated with the management mobility between different access technology and different operators and relatively complicated. In general, the mobility management requirements have the following: ·independent of access network technology: based on IP technology NGN will from the core nets and use different access technology access network structure, so the requirement mobility management and access technology irrelevant;·based on IP technology: NGN will with IP as the foundation, mobility management should also and IP technology cohesion is good, including IPv4 and IPv6;·support network of roaming and not rely on between access types and network management is attributive;·support terminal, personal and service of mobility.In addition, in order to support the mobility of the user requirements, in the control layer needs to realize some particular functions, such as identification and evaluation mechanism, access control and authorized function, location management (including the network position and location management), paging ability, IP address allocation and management (including fixed and dynamic IP address), user environment, the user profile and user data rights management, support different types of mobility management function interaction.*Five, the IP network management frameworkWith IP network technology development, the IP network in network resources the reuse of the ability of flexibility and expansibility, network has a huge advantage. At the same time, along with IP network technology based on the popularity of the Internet, in carrying more IP network business, including telecommunications business become clear trend of development. Telecommunication business here mainly refers to the voice and video business. It contains three characteristics: first, these business flow is mainly continuous media flow, and usually interactive; Second, these business need to meet the telecommunication level performance and reliability requirements; Third, the business is operational, managed. Telecom operators as business providers can collect business expenses for service performance, at the same time, provide commitment.MAN-NGN concept is based on the SLA managed IP network, the SLA is business providers and users of the agreement between business and the requirements of the customers made clear the SLA and the commitment of the business providers, the provisions of the services provided quality standards, set the business providers must complete performance index.SLA defined in the network capacity can provide. Based on the SLA request or order way realization, the user can also for every application specific performance requirements, such as bandwidth, transfer delay, such as traffic, of course, also can not SLA, namely enjoy no service quality assurance of the best service. IP network application SLA can ensure that provides to the user's network performance and usability. So far, network operators can only control including reliability and usability, the network performance. Through consultation with the user, operators should be able to control and management of the IP network resources, so that the application type according to different types of equipment and provide and the SLA through consistent end-to-end connection performance.MAN-NGN business from the point of view of the user defined, the business concept with existing network is quite different. Network and the function of the business provides separate, network provider responsible for scheduling and network resources network control and to provide the users must network capacity, the user can network providers in the help of the development of their own businesses. MAN-NGN business may be defined as: (1) allows the user to select end users (including people, terminal equipment, application); (2) allows users to use network providers to provide relevant network resources allocation of their network business and network structure; (3) allows users through consultation with the network providers about QoS and including security, including the ability to the performance of network for his own network of SLA choose some control and management functions.MAN-NGN network providers to business requirements users with certain network capacity, the network can ability through negotiation by both sides, divided into different management level. MAN-NGN business requirements can be divided into application level performance and network level performance requirements.(1) end users business requirements, namely the application level performance requirements, including usability (such as 99.999%), response time (such as 1 M file download time less than 5 ms), business jam probability, the business priority and QoS/CoS.(2) network provider business requirements, namely the network level performance requirements, including error ration and bag bag, two-way traffic delay/single diameter delay and delay jitter, usability (system normal running time, average fault time and mean time torepair), peak bandwidth, effective bandwidth and minimum bandwidth, mobile access authentication two-way when local time delay, access blocking probability and business complete probability, the flow monitoring and statistics.(3) business requirements and VPN network provider business requirements basic same, but considering if network providers to different VPN is Shared between physical infrastructure, and not like this to different VPN using physically independent link and router </files/0409search.shtml > respectively operation, then will save cost. So VPN business requirements including VPN configuration and operation, VPN authentication and the safety of the right of discrimination, guarantee.(4) application providers business requirements depends on the specific application of its business requirements and application number of customers, application server </files/0402search.shtml > ability, connect customers and application of the network provider capacity, closely related. Performance requirements are: transmit priority and QoS/CoS, including access control and certification, ensure the safety, performance monitoring, to users, business and terminal type identification, server redundancy and server cluster, name and authentication of the two-way delay.*Six, based on IP network buildup QoS requirementsAs for operators, and now the challenge is how to a very effective and realistic way for different business to provide satisfactory end-to-end QoS guarantee, while also fully consider the performance of the entire network. The support of the reunification of the IP network is QoS ability development trend. The existing solutions including RSVP, IntServ, IntServ, Diffserv, MPLS, TE, strategy management, QoS signal and so on, but these methods and can't solve the problem of QoS. And, because at present each equipment manufacturers realize QoS in different ways, not complete relevant standardized work, become end-to-end QoS cannot solve the main reason. In the IP network support end-to-end QoS ability of the standardization, both the IETF and ITU-T play their role, dedicated to various concrete implementation IETF agreement, and the ITU-T is more focused on the overall framework of the formulation and IP performance index system construction. In addition, intracity networks exchange BBS (MSF), Internet II and IPCablecom also offers a variety of end-to-end IP QoS solutions.。

2004~2010部分软考(程序员)真题参考答案(持续更新中)

2004~2010部分软考(程序员)真题参考答案(持续更新中)

2004年上半年程序员级答案上午下午:试题一(1)j ← j-1(2)I ← i+1(3)A[i]←pivot 或[j]←pivot(4)A,L,k-I 或A,L,k(5)A,k+I,H 或A,k,H试题二(1)*pi == *pj(2)pi<pj 或 *pi != *pj(3)str[i] == del(4)str[j](5) i = j+1试题三(1)工程文件的扩展名是 vbp,窗体文件的扩展名是 frm,标准模块文件的扩展名是 bas。

(2)保存(&S)(3)解答:“放大”按钮单击事件过程中的程序代码:Image1.Width=Image1.Width*1.11mage1.Height=Image1.Height*1.1“缩小”按钮单击事件过程中的程序代码:Image1.Width=Image1.Width*0.91mage1.Height=Image1.Height*0.9(4)将该单选按钮的Value属性值设置成True(5)消息框的标题栏显示“提示”:消息框中有一个出错标记以及两个命令按钮,分别显示“确定”和“取消”;消息框中显示的信息为“非法操作!”。

试题四(1)S->top(2)S->elem[S->top++]·(3)S->elem[-S->top](4)n % B(5)n / B试题五(1)Text(2)listlndex(3)Val(Txtln.Text) 或Txtln.Text(4)CmbOp.Text(5)EndSelect试题六(1)k<1en(2)q=q->next 或 q=(*q).next(3)pres = Lb(4)prep->next或(*prep).next(5)s 或 pres->next 或 (*pres).next试题七(1)false(2)300(3)enabled(4)Label.Visible(5)false试题八(1)employee[j].Id!=Id(2)++N 或 N++ 或 N=N+1(3)employee[i].Salary-BASE(4)k>payleve[j](5)k>payleve[j-1](1)Val(Txt_salary.Text)-Val(Txt_base.Text)(2)k>paylevel(j)(3)k-paylevel(j-1)(4)Txt_tax.Text(5)False2004下半年程序员级试题答案上午:下午:试题一(1)i:1,1,8(2)1→sw(3) 0→BIT[i](4)NOP,或空操作(5)1→BIT[i]试题二(1)j%2,及其等价形式(2)i+=2,及其等价形式(3)tag>2,或tag==3或tag>=3,及其等价形式(5)45试题三(1)p && k<i,及其等价形式(2)!p->next,及其等价形式(3)q->next(4)prep->next(5)q->next=p试题四(1)(h-9)*60+m,及其等价形式(2)time + R[k].d[ch-'a']*20 其中ch-'a'可以表示为ch-97,R[k]可以表示为R[R[k].no](3)R[t].num == R[j].num && R[t].time > R[j].time,及其等价形式(4)t!=i,及其等价形式,表达式的值为真也正确(5)R[i],及其等价形式试题五(1)Asc("A")+i-1,或64+i,及其等价形式(2)(h-9)*60+m,及其等价形式(3)Combol.Text(4)Value(5)Time+R(k).d(m)*20 其中m可表示为Asc(ch)-Asc("A")或Asc(ch)-65,k可表示为R(R(k).no)试题六(C++)(1)public Figure(2)height*width(3)public Rectangle(4)this->height=this->width=width(5)public Figure 若填public Rectangle只给1分试题七(1)False(2)True(3)SetFocus(4)Delete(5)Update试题八(Java)(1)Figure(2)height*width(3)Rectangle(4)super(width,width)(5)Figure2005上半年程序员级试题答案上午:下午:试题一(1) 0(2) 1,7,1(3) Bi(4) B0(5) 1试题二(1) m!=n(2) return m 或return n(3) i < 8,或i <=7(4) k * 10(5) p++,或++p,或 p+=1,或p=p+1 (6)试题三(1) p = root->rch(2) pre = root(3) p->lch(4) pre(5) pre->lch试题四(1) j = 0(2) k < R(3) i+t(4) c >=R(5) j++,或++j,或j+=1,或j=j+1试题五(1) st.List(0)(2) ListCount(3) c*Abs(d(j)-d(i))(4) st.ListIndex(5) Price.Text试题六(1) Applet(2) Graphics g(3) init(4) String(5) HelloApplet.class试题七(1) Drivel.Drive(2) Dir1.Path(3) fso(4) MyTextFile(5) d <> 0试题八(1) enum(2) this->year(3) month(4) IsLeapYear()(5) CaculateDays2005下半年程序员级试题答案上午:下午:试题一(1) i <= n(2) ch (j) = KB(3) k <= j(4) ch(k-i+1)(5) n试题二(1) n-i-1(2) Count + 2(3) a[i] < Minnum(4) a[n-i-1] >Maxnum(5) a[n-i-1]试题三(1) (low + high) / 2(2) 1.0 / (p+m)->Ratio(3) m + 1(4) (p+1)->Ratio - p->Ratio(5) Temp - p->Temp试题四(1) 密码(&p)(2) true(3) Static times(4) Username.Text = ″ali88″ and Password.Text = ″zmkm″(5) frmApp.Show试题五(1) *s = str(2) p = root(3) p = = NULL(4) parent->Rch(5) parent->Lch试题六(1) shares (n)04代码行修改结果:public:06代码行修改结果:Stock (int n,double pr=3.5):shares (n){ 10代码行修改结果:~Stock () {}输出结果(2) 0∶0(3) 0∶0试题七(1) 500(2) S/30(3) S = 0 or first(4) H/6 + M/360(5) False试题八01代码行修改结果:class Stock{02代码行修改结果:{06代码行修改结果:public Stock (){getData();}07代码行修改结果:public Stock (int n,double pr){程序运行的输出结果为:0∶0.0 1∶67.52006上半年程序员级试题答案上午:下午:试题一[问题1]0 0 10 1 01 0 0[问题2]a b ab c ba b a[问题3](1) B(j,n-i+1)(2) C(n-i+1,n-j+1)(3) A(n-j+1,i)试题二(1) num/10000 > 0(2) result = 0(3) m/10(4) d * 10 + d(5) mul * 100试题三(1) InitStack(&s_bak)(2) Top(*s)(3) Push(&s_bak,ch)(4) !IsEmpty(s_bak)(5) Pop(&s_bak)试题四(1) acc_qty = 0(2) P_num[i] * data[i].Price(3) acc_qty - acc_req[i](4) tag(5) cost_Produce + cost_Keep < mincost试题五(1) List1.Text(2) List1.ListCount - 1(3) List1.List(i)(4) List2.ListIndex(5) List2.Clear试题六(1) this->j(2) SuperClass错误更正结果:SuperClass * s = new SubClass(-3) 变量j的值:0运行结果: -3 2试题七(1) True(2) x As Single(3) 2 + Sin(x)(4) 2 + Cos(x)(5) Timer1.Enabled = False试题八(1) this(2) super错误更正结果:public abstract int getSum ()变量i的值:5运行结果: -322006下半年程序员级试题答案上午:下午:试题一(1)转第七步(2)栈空(3)G[x,y] ← newcolor(4)第三步(5)可以试题二(1) !feof(fp)(2) i < n && str[i]!='\0'(3) tag > = 1 && tag <= 3(4) q++(5) candidate[i]++试题三(1) M.cols(2) M.rows(3) Cpot[0] = 0(4) Cpot[j-1] + num[j-1](5) M.data[t].c试题四(1)对文字标签中的文字,分别控制其粗体、斜体和下划线设置(2)将该文本框清空;弹出消息框,提示重新输入;光标定位于该文本框中(3) a(c) + a(c-1)(4) StrTemp(5) a(c)试题五(1) stud_info[i].link(2) !strcmp(p->cname,kc)(3) sum + p ->grade(4) *num = count(5) count ! = 0试题六(1) virtual void(2) Decorator(t)(3) Decorator(t)(4) &f(5) &a试题七(1) x,Lasty(2) (i+1)(3) (T - 20) / 180(4) ShpMeter.Top + ShpMeter.Height(5) 200 - T试题八(1) super(t)(2) super(t)(3) new FootDecoratro (new SalesTicket())(4) printTicket()(5) new HeadDecorator (null)2007上半年程序员级试题答案上午:下午:试题一【问题1】(1)(11-I)*a[I](2) 9(3) S+(11-I)*a[I]->S(4) (11-R)%11【问题2】9试题二错误1:变量k没有声明错误2:变量num没有初始化,或者num应初始化为0错误3:第10行scanf 函数参数错错误4:第13行循环条件错错误5:第14行if语句条件错,或者将"="改为"=="试题三(1) years--(2) 12 - r.month(3) &r(4) months--(5) years * 12试题四(1) ptr ->next(2) head ->next(3) ptr != endptr(4) ptr(5) preptr试题五(1) form Users(2) Adodc1.Recordset("UserID")(3) txtUserID.Text(4) txtPassword.Text = pwd(5) frmApp.Show【问题1】(1) Stock(): shares(1),share_val(1)(2) cout【问题2】错误1:第4行,修改为:public:错误2:第9行,修改为:~Stock(){}【问题3】否,或不存在内存泄漏试题七(1) True(2) GreenT = GreenT - 1(3) Call LoadNumber(40)(4) N/10(5) N -i*10试题八【问题1】错误1:第1行,修改为: class Stock{错误2:第2行,修改为: {错误3:第4行,修改为: share_val = 0;错误4:第7行,修改为: public Stock(int n ,int pr){ 【问题2】(1) new Stock()2007下半年程序员级试题答案上午:下午:试题一(1)1 (2)2 (3)m (4)D[m+1] (5)m←m+1试题二(1)days++,days+=1,days=days+1 (2)date==5 (3)m < 12(4)isLeapYear(year) 或year%4==0 && year%100!=0 || year%400==0(5)date试题三(1)str[0] == 'i',或*str == 'i' (2)t_end < t_start (3)24*60*60 (4)interval / 60 (5)c++,c+=1,c=c+1试题四(1)head -> next (2)ptr(3)q->data == ptr->data或ptr->next->data == ptr->data(4)ptr -> next (5)ptr[问题1] ① ⑤[问题2] (1)3 (2)5 (3)无(4)4 (5)无(6)5[问题3] ② ⑤试题六(1)n(i) (2)Tim1.Enabled = False (3)1 (4)ng + 1 (5)Str$(j) + "号胜出",或Str(j) + "号胜出"试题七[问题1] ① ⑤[问题2](1)3 (2)5 (3)无(4)4 (5)无(6)5[问题3] ② ⑤2008年下半年程序员级答案上午:下午:试题一(1)j+1(2)i+1(3)0(4)i试题二(1)m%10(2)k-i-1(3)!isPalm(m)(4)a(5) n+a试题三(1)i<n(2) 0(3)Ht[pf](4)Pf(5)tstr+start+1试题四问题一:return (fib1(n-1)+fib1(n-2));long f=1;问题二:数据溢出问题三:fib1较慢调用开销。

2010年上半年 程序员 应用技术

2010年上半年 程序员 应用技术

全国计算机技术与软件专业技术资格(水平)考试2010年上半年程序员下午试卷(考试时间14:00~16:30 共150 分钟)1.在答题纸的指定位置填写你所在的省、自治区、直辖市、计划单列市的名称。

2.在答题纸的指定位置填写准考证号、出生年月日和姓名。

3.答题纸上除填写上述内容外只能写解答。

4.本试卷共6道题,试题一至试题四是必答题,试题五至试题六选答1 道。

每题15 分,满分75 分。

5.解答时字迹务必清楚,字迹不清时,将不评分。

6.仿照下面例题,将解答写在答题纸的对应栏内。

例题2010 年上半年全国计算机技术与软件专业技术资格(水平)考试日期是(1)月(2)日。

因为正确的解答是“5 月20 日”,故在答题纸的对应栏内写上“5”和“20”(参看下表)。

【说明】下面的流程图旨在统计指定关键词在某一篇文章中出现的次数。

设这篇文章由字符A(0),…,A(n-l)依次组成,指定关键词由字符B(0),…,B(m-l) 依次组成,其中n>m>=l。

注意,关键词的各次出现不允许有交叉重叠。

例如,在“aaaa”中只出现两次“aa”。

该流程图采用的算法是:在字符串A中,从左到右寻找与字符串B相匹配的并且没有交叉重叠的所有子串。

流程图中,i为字符串A中当前正在进行比较的动态子串首字符的下标,j 为字符串B的下标,k为指定关键词出现的次数。

【流程图】阅读以下问题说明、C程序和函数,将解答填入答题纸的对应栏内。

【问题1】分析下面的C程序,指出错误代码(或运行异常代码)所在的行号。

【C程序】【问题2】函数inputArr(int a[], int n)的功能是输入一组整数(输入0或输入的整数个数迖到n时结束)存入数组a,并返回实际输入的整数个数。

函数inputArr可以成功编译。

但测试函数调用inputArr后,发现运行结果不正确。

请指出错误所在的代码行号,并在不增加和删除代码行的情况下进行修改,写出修改正确后的完整代码行,使之符合上述设计意图。

程序员考试试题及答案

程序员考试试题及答案

程序员考试试题及答案一、单选题(共60题,共120分)1.某编辑在编辑文稿时发现如下错误,其中最严重的错误是( )。

A.段落标题编号错误B.将某地区名列入了国家名单C.语句不通顺、有明显的错别字D.标点符号、字体、字号不符合要求ABCD正确答案:B2.某县有6.6 万个贫困户,县委组织人员调査6.6 万个贫困户经济收入,从中抽取1800 个贫困户的经济收入进行分析。

请问本次调查的总体、个体、样本及样本容量分别为( )。

A.6.6 万个贫困户经济收入、每个贫困户的经济收入、1800、1800 个贫困户B.6.6 万个贫困户、1800 个贫困户经济收入、每个贫困户的经济收入、1800C.6.6 万个贫困户、每个贫困户的经济收入、1800 个贫困户经济收入D.6.6 万个贫困户、每个贫困户的经济收入、1800、1800 个贫困户经济收入ABCD正确答案:C3.在E x c e l 中,若在A1 单元格输入如下图所示的内容,则A1 的值为( )A.7B.8C.T R U ED.#N A M E?ABCD正确答案:B4.在E x c e l 中,单元格L3 内容为“软件工程技术”,若要取单元格L3 前两个字“软件”放入单元格M3 中,则在M3 中可输入( ),并按下回车键即可。

A.=L E F T B(M3,2)B.=L E F T(M3,2)C.=L E F T B(L3,2)D.=L E F T(L3,2)ABCD正确答案:D5.电子邮件地址“*******************.org”中的z h a n g l i、@和m a i l.c e i a e c.o r g 分别表示用户信箱的( )。

A.邮件接收服务器域名、帐号和分隔符B.邮件接收服务器域名、分隔符和帐号C.帐号、分隔符和邮件接收服务器域名D.帐号、邮件接收服务器域名和分隔符ABCD正确答案:C6.程序计数器( P C)是用来指出下一条待执行指令地址的,它属于()中的部件A.C P UB.R A MC.C a c h eD.U S BABCD正确答案:A7.以下关于主流固态硬盘的叙述中,正确的是( )A.存储介质是磁表面存储器,比机械硬盘功耗高B.存储介质是磁表面存储器,比机械硬盘功耗低C.存储介质是闪存芯片,比机械硬盘功耗高D.存储介质是闪存芯片,比机械使盘功耗低ABCD正确答案:D8.C P U 中可用来暂存运算结果的是( )A.算逻运算单元B.累加器C.数据总线D.状态寄存器ABCD正确答案:B9.微机系统中系统总线的( )是指单位时间内总线上传送的数据量。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档