首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设已执行预编译命令#include<string.h>,以下程序段的输出结果是( )。 char s[]=" an apple" ; printf(" %d\n" ,strlen(s));
设已执行预编译命令#include<string.h>,以下程序段的输出结果是( )。 char s[]=" an apple" ; printf(" %d\n" ,strlen(s));
admin
2009-02-15
29
问题
设已执行预编译命令#include<string.h>,以下程序段的输出结果是( )。 char s[]=" an apple" ; printf(" %d\n" ,strlen(s));
选项
A、7
B、8
C、9
D、10
答案
2
解析
如果一个字符数组中存放一个字符串,则函数strlen的值为“\0”之前的全部字符个数,也包括空格在内。注意:字符串处理函数的使用。
转载请注明原文地址:https://kaotiyun.com/show/YvXp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
在数据库系统中,数据模型包括概念模型、逻辑模型和()。
下列关于栈的叙述正确的是
有两个关系R和S如下:由关系R通过运算得到关系S,则所使用的运算为
能够用于标识对象名称的属性是
窗体上有名称分别为Text1、Text2的文本框,名称为Commandl的命令按钳。运行程序,在Text1中输入“FormList",然后单击命令按钮,执行如下程序:PrivateSubCommandl_Click()
当文本框中的内容发生改变时所触发的事件是
以下关于数组的叙述中,错误的是
数据库系统的数据独立性是指()。
(1)在考生文件夹下有一个工程文件sjt3.vbp,其功能是:①单击“读数据”按钮,则把考生文件夹下in3.dat文件中的100个正整数读入数组a中;②单击“统计”按钮,则找出这100个正整数中的所有完全平方数(一个整数若是另外一个整数的平
以下VisualBasic不支持的循环结构是
随机试题
小儿神经反射的发育,恰当的是
麻黄具有的功效是()
A.干酪性肺炎B.葡萄球菌肺炎C.革兰阴性杆菌肺炎D.急性肺脓肿E.肺癌多见于体弱、心肺慢性疾病患者院内获得性感染的是
对耐药金葡菌感染可选用()
下列哪些规范不得授权行政机关自行强制执行具体行政行为?()
(2013年)一阶被控对象的特性参数主要有()。
由( )单位组织的供热管网工程验收是总验收。
旅行社组织的旅游活动中发生保险事故,()通知保险公司的,保险公司应当及时告知具体的赔偿程序等有关事项。
因特网主要由通信线路、______、主机和信息资源4部分组成。
A、Theself-assuredones.B、Thehigh-incomeones.C、Theaverageones.D、Thepopularones.A短文提到自信的人可能看起来比他们本身表现更出色一点,而且对加薪的忧虑也少点,
最新回复
(
0
)