首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下面程序的输出结果是( )。 #include #include“string.h” void main() {char a[]=“Hello Test”,b[]=“Test”; strcpy
下面程序的输出结果是( )。 #include #include“string.h” void main() {char a[]=“Hello Test”,b[]=“Test”; strcpy
admin
2012-12-29
26
问题
下面程序的输出结果是( )。
#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/BuVp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
若有以下程序#include<stdio.h>intfun(intx){inty;y=x++:returny;}main(){intk;for(k=0;k<3;k++){pfinff("%d,",fun(k)+k);k++;}
已知一个文件中存放若干工人档案记录,其数据结构如下:structa{charnumber[100];intage;floatp[6];};定义一个数组:structanumber[10];
对长度为n的线性表排序,在最坏情况下,比较次数不是n(n-1)/2的排序方法是()。
若有以下定义:intx[10],*pt=x;则对x数组元素的正确引用是()。
结构化程序的三种基本控制结构是()。
下列选项中与if(a==1)a=b;elsea++;语句功能不同的switch语句是()。
以下程序段中,与语句k=a>b?(b>c?1:0):0;功能相同的是()。
下面属于白盒测试方法的是()。
下面不属于软件需求规格说明书内容的是()。
某二又树有5个度为2的结点,则该二叉树中的叶子结点数是()。
随机试题
不是产气荚膜梭菌致病物质的是()
我国地质调查局认定,2008年5月12日发生在四川汶川的地震,其产生的主要原因是()。
职权与组织层级化设计中的_____紧密相关,跟个人特质无关。
以下哪一项属于白庀的病因病机()
下列哪些选项属于人民检察院在审查起诉时,应当作出不起诉决定的情形?()
保险合同中,负有支付保险费义务的人是()。
期货交易所应当按照手续费收入的( )的比例提取风险准备金。
在16×16的点阵字库中,存储一个汉字的字模信息需用的字节数是()。
Whatinformationdidthemanhearfromthebroadcast?
Ourbrainshavebeenprocessingsophisticatedinformationviaoursensesformillionsofyears.Sowhyisitwearestill【B1】___
最新回复
(
0
)