首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序(程序左边的数字为附加的行号)______。 1#include<str.h> 2#include<stdio.h> 3main() 4{ char s[]="string"; 5puts(s); 6strcp
以下程序(程序左边的数字为附加的行号)______。 1#include<str.h> 2#include<stdio.h> 3main() 4{ char s[]="string"; 5puts(s); 6strcp
admin
2009-04-15
18
问题
以下程序(程序左边的数字为附加的行号)______。 1#include<str.h> 2#include<stdio.h> 3main() 4{ char s[]="string"; 5puts(s); 6strcpy(s,"hello"); 7printf("%3s\n",s);}
选项
A、没有错
B、第1行有错
C、第6行有错
D、第7行有错
答案
2
解析
字符串复制函数strcpy包含在头文件string.h中,因此,程序中的第1行文件包含命令是错误的。
转载请注明原文地址:https://kaotiyun.com/show/nZXp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
窗体上有文本框Textl和一个菜单,菜单标题、名称见表,结构如图2所示。要求程序执行时单击”保存”菜单项,则把其标题显示在Textl文本框中,下面可实现此功能的事件过程是()。
下列各声明语句中错误的是()。
以下能够设置控件焦点的方法是()。
下面的程序运行时,单击窗体后,窗体上显示的结果是()。PrivateSubForm_Click()Dima(1To6)AsIntegerDimmin1%,i%,j%,n%,t%,k%a(1)=8
软件设计中划分模块的一个准则是()。
(1)在考生文件夹下有一个工程文件sit3.vbp,在Forml的窗体中有一个文本框、两个命令按钮和一个计时器。程序的功能是在运行时,单击“开始计数”按钮,就开始计数,每隔1秒,文本框中的数加1;单击“停止计数”按钮,则停止计数(如图3—165所示)。要求
在考生文件夹下有一个工程文件Sjt4.vbp,相应的窗体文件为sjt4.frm,在窗体上有一个文本框和一个命令按钮。程序运行后,单击命令按钮,即可计算出1一1000范围内能被7整除或被5整除的整数的个数,并显示在文本框中。在窗体的代码窗口中,已给出了部分程
结构化程序设计中,下面对goto语句使用描述正确的是
若要清除列表框控件中的所有列表项,应该使用的方法是
字符(char)型数据在微机内存中的存储形式是()
随机试题
流行性乙型脑炎的传播媒介是三带吻库蚊,传染源是患者。()
女性,56岁,1年前开始出现久站或咳嗽时左腹股沟区胀痛,平卧时无不适。查体:体态较胖,腹部无压痛,站立时左腹股沟下内侧突起半球形包块,嘱患者咳嗽时无明显冲击感。首先考虑的诊断是
A、梨形心B、靴形心C、三角烧瓶状心D、心底部浊音界增宽E、心浊音界明显缩小二尖瓣狭窄时心脏叩诊可见到的体征是
A.臀大肌、臀中肌、臀小肌B.上臂三角肌下缘C.大腿外侧方、上臂三角肌下缘D.四肢浅静脉E.前臂掌侧静脉注射常用部位是()
招徕定价又称特价商品定价,是一种有意将少数商品降价以招徕吸引顾客的定价方式。商品的价格定得低于市价,一般都能引起消费者的注意,这是适合消费者求廉心理的。根据上述定义,下列采用了招徕定价策略的一项是()。
为提升残疾人工作者对聋哑人群的服务水平.市残联决定为残联系统工作人员开办“沟通无障碍”的手语培训班,假如领导把任务交给你来负责,你打算如何做?
潜台词本是戏剧用语,指的是台词实际包含而没有明确说出的意见,所谓题外之旨,言外之意。丰富的潜台词往往能使表演更加耐人寻味。根据上述定义,以下哪项表述中包含典型的潜台词?
在用最小变化法测量阈限的实验中,当递增系列的阈限大于递减系列的阈限且差异显著时,可以断定被试存在()
根据法律规定,因技术进出口合同争议提起诉讼的期限为()(2011年一专一第33题)
OneSaturday,MarkandJanedecidedtogotoahillneartheirvillage.Theymadesomefoodtotakealong【C1】______lunch.Thetw
最新回复
(
0
)