首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序的输出是【 】。 main() { char str1[]=How do you do",*p=strl; strcpy(str1+strlen(str1)\2"es she"); pfinff("
以下程序的输出是【 】。 main() { char str1[]=How do you do",*p=strl; strcpy(str1+strlen(str1)\2"es she"); pfinff("
admin
2010-09-05
37
问题
以下程序的输出是【 】。
main()
{
char str1[]=How do you do",*p=strl;
strcpy(str1+strlen(str1)\2"es she");
pfinff("%s\n",p1);
}
选项
答案
How does she
解析
strcpy(strl,sl):字符串拷贝函数,作用是将字符串sl拷贝到字符数组strl中去。strlen(str):测试字符串str的长度,函数的值为字符串中实际长度,不包括‘\0’在内。本题中strlen(str l)的值为13,则strcpy(strl+strlen(strl)/2"es she")相当于strcpy(strl+6"es she");,因此可得答案为How does she。
转载请注明原文地址:https://kaotiyun.com/show/gdWp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
窗体上有1个名称为Command1的命令按钮,1个名称为List1、没有列表项的列表框。编写如下程序:PrivateSubCommand1_Click()DimxAsString,sAsString,tempAsString
数据字典(DD)所定义的对象都包含于
表达式12/2\4的值是( )。
下面是求最大公约数的函数的首部()。Functionfun(ByValxAsInteger,ByValyAsInteger)AsInteger若要输出8、12、16这3个数的最大公约数,下面正确的语句是
下列与队列结构有关联的是
在进行逻辑设计时,将E-R图中实体之间联系转换为关系数据库的
从键盘上输入一个浮点数asingle,利用字符串函数对该数进行处理后,如果输出的内容不是“非浮点数”,则对程序输出的内容分析正确的是()。asingle=InputBox("请输入一个浮点数:")strl$=Str$(asing
在考生文件夹下有,一个工程文件sjt5.vbp,其窗体上有一个名称为Textl的文本框;还有两个名称分别为Cl、C2的命令按钮,标题分别为“计算”、“存盘”。有一个函数过程。isprime(a)可以在程序中直接调用,其功能是判断参数a是否为素数,如果是素数
若在窗体模块的声明部分声明了如下自定义类型和数组PrivateTypeTemScoreAsIntegerStrNameAsStringEndTypeDimStudent(5)AsTem
在VisualBasic环境下设计应用程序时,系统能自动检查出的错误是( )。
随机试题
结构与甲状腺激素类似,可影响甲状腺激素代谢的是
诱导免疫耐受的方法是
华某,男,11岁,昨日淋雨后出现头痛,恶寒发热,项背强直,肢体酸重,蔷白腻,脉浮紧。
空头套期保值者是指( )。
下列期权属于虚值期权的有()。
伍子胥父诛于楚,子胥挟弓,身干阖闾。阖闾曰:“士之甚,勇之甚。”将为之报仇。子胥曰:“不可,诸侯不为匹夫报仇。臣闻事君犹事父也,亏君之行,报父之仇,不可。”于是止。蔡昭公南朝楚,被羔裘,囊瓦求之,昭公不与。即拘昭公南郢(yǐng),三年然后归之。
根据下面两张宫殿的平面简图,下列说法正确的是()。
PM2.5浓度升高既有气象原因,也有污染排放原因,其中污染排放为首的主要因素有:汽车尾气的排放,使用柴油的大型车是“重犯”,包括大型公交车、各单位的班车,以及大型运输卡车等;工业生产排放的废气,在工业生产过程中,不可避免地会向大气排放大量的工业废气,包括可
以下说法不属于文中提到的“这类事情”的是;对“证明科学的所作所为是焚琴煮鹤”中的“焚琴煮鹤”理解正确的一项是:
Thenursingstaff______.Whymustnursesworkinshifts?
最新回复
(
0
)