首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下面程序的输出结果是( )。 #include #include"string.h" void main() {char a[]="Hello Test",b[]="Test"; strcpy(a,b);
下面程序的输出结果是( )。 #include #include"string.h" void main() {char a[]="Hello Test",b[]="Test"; strcpy(a,b);
admin
2021-06-10
13
问题
下面程序的输出结果是( )。
#include
#include"string.h"
void main()
{char a[]="Hello Test",b[]="Test";
strcpy(a,b);
cout<
}
选项
A、Hello
B、Test
C、Hello Test
D、Hello Test HelloTest
答案
B
解析
程序中首先定义字符数组a和b,其值分别为“Hello Test”和“Test”。然后利用strcpy复制函数,将b的值复制给a,所以输出a的结果为Test。
转载请注明原文地址:https://kaotiyun.com/show/kufp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
有如下程序:#includeusingnamespacestd;intmain(){inti=1,s=0;while(s
使用VC6打开考生文件夹下的源程序文件modi2.cpp。请完成函数fun(char*s1,char*s2),此函数的功能是计算s1中出现s2的个数,当不出现时,则返0。如:s1为’’1112223333aaaaeeffd’’s2为’’11’’则返回1
下面不属于软件工程的3个要素是
下列叙述中,不属于软件需求规格说明书的作用的是()。
在一个容量为15的循环队列中,若头指针front=-6,尾指针rear=9,则循环队列中的元素个数为()。
模板对类型的参数化提供了很好的支持,因此()。
使用VC6打开考生文件夹下的源程序文件modi3.cpp。其中定义的类并不完整,按要求完成下列操作,将类的定义补充完整。完成以下功能:(1)定义类CPoint的带有两个参数的构造函数,两个变量为x、y都为int型,且缺省值为0。请在注释//*******
数据流图中带有箭头的线段表示的是( )。
设一棵度为3的树,其中度为2,1,0的结点数分别为3,1,6。该树中度为3的结点数为()。
算法的空间复杂度是指()。
随机试题
公平理论主要讨论报酬的公平性对人们工作积极性的影响,人们往往通过()两个方面的比较来判断其所获得报酬的公平性。
ThenorthernpartsoftheUnitedStatesgetverycoldinthewinter.Itsnowsagreatdealandthetemperatureoftengoes【C1】___
(2008年)在双缝干涉实验中,在给定入射单色光的情况下,用一片能通过光的薄介质片(不吸收光线)将双缝装置中的下面一个缝盖住,则屏幕上干涉条纹的变化隋况是()。
在编制“资产负债表”时,下列不应列入“存货”项目的是指()
战略实施完全是以()为导向。
企业购置用于环境保护、节能节水、安全生产等专用设备的投资额,适用企业所得税的优惠政策是()。
毛泽东对“实事求是”这句话作了科学解释的著作是()。
若p为非负实数,随机变量ξ的概率分布为则Eξ的最大值为____________,Dξ的最大值为____________.
阅读以下文字,完成问题。中华民族正处在伟大民族复兴的进程之中,民族的复兴必然与民族文化的复兴相关联,在我国历史上虽说是由儒、道、释三家构成中华文化,但儒学却一直曾居于主流地位,影响着中国社会生活的方方面面。因此,儒学的复兴和中华民族的复兴是分不开
A、Discussingadinnerinvitation.B、Talkingaboutamaddog.C、Freezingtheiceforthedinner.D、Waitingforabusincoldweat
最新回复
(
0
)