首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下定义: struct person{char name[9];int age;}; struct person class[10]={"Johu",17,"Paul",19,"Mary",18,"Adam",16,};根据上述定义,能输出
有如下定义: struct person{char name[9];int age;}; struct person class[10]={"Johu",17,"Paul",19,"Mary",18,"Adam",16,};根据上述定义,能输出
admin
2009-02-15
21
问题
有如下定义: struct person{char name[9];int age;}; struct person class[10]={"Johu",17,"Paul",19,"Mary",18,"Adam",16,};根据上述定义,能输出字母M的语句是______。
选项
A、printf("%c\n",class[3].name);
B、printf("%c\n",class[3].name[1]);
C、printf("%c\n",class[2].name[1]);
D、printf("%c\n",class[2].name[O]);
答案
8
解析
该题主要考查C语言数组下标的概念,即C语言中数组的下标是从。开始的。
转载请注明原文地址:https://kaotiyun.com/show/Q8Xp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
定义学生、教师和课程的关系模式S(S#,Sn,Sd,Dc,sa)(其属性分别为学号、姓名、所在系、所在系的系主任、年龄);C(C#,Cn,P#)(其属性分别为课程号、课程名、先修课);SC(S#,C#,G)(其属性分别为学号、课程号和成绩)。包含对非主属性
下列处理中与队列有关的是()。
下列关于利用通用对话框产生的文件对话框的相关属性的描述中,错误的是()。
编写如下程序:PrivateSubCommand1_Click()DimxAsIntegerx=10Printfun1(x,12)+xEndSubPrivateFunctionf
某系统结构图如下图所示(图中n≥5)该系统结构图的宽度是()。
设工程中有2个窗体:Forml和Form2,每个窗体上都有一个名称为Text1的文本框。若希望把Form1上文本框中的内容复制到Form2上的文本框中,应进行的操作是()。
某棵树中共有25个结点,且只有度为3的结点和叶子结点,其中叶子结点有7个,则该树中度为3的结点数为()。
要使得文件列表框Filel中只显示文件扩展名为jpg的图片文件,则下列正确酌语句是
窗体上有1个名称为Text1的文本框,1个名称为Timerl的计时器,且己在属性窗口将Timer1的Interval属性设置为2000、Enabled属性设置为False。以下程序的功能是,单击窗体,则每隔2秒钟在Text1中显示一次当前时间。Priva
有以下程序main(){chara[]={’a’,’b’,’c’,’d’,’e’,’f’,’g’,’h’,’\0’};inti,j;i=sizeof(a);j=strlen(
随机试题
女性62岁中专文化已婚退休干部近三个月来说不清原因出现失眠、早醒、饮食差、体重明显减轻,做家务经常出错,近半个月加重,不愿意出门活动,在家总躺着,话少、来人看她也爱答不理,说自己乏力,得绝病了,活着没意思,不如死了,且不认为有病。因治
两根材料相同、抗弯刚度相同的简支梁如下图所示,则下列结论中正确的为()。
对消费者需求量影响最大的是()。
象征人品清逸,气节高尚的是()。
“假如现在让你做你们公司的人事部经理,你会怎么做?”,这种问题类型属于()。
下列属于宏观调控措施的有()。
由商品的价格变动所引起的商品相对价格的变动,进而由商品的相对价格变动所引起的商品需求量的变动,称为()。
下列行为中属于内部行政行为的是()。
该公司用一个C类地址块202.119.110.0/24组网,将下表中的(1)~(6)处空缺的主机地址或子网掩码填写在答题纸的相应位置。可以采用(10)方法防止IP地址被盗用。(10)A.IP地址与子网掩码进行绑定B.IP地址与MAC地址进行
例如:女:晚饭做好了,准备吃饭了。男:等一会儿,比赛还有三分钟就结束了。女:快点儿吧,一起吃,菜凉了就不好吃了。男:你先吃,我马上就看完了。问:男的在做什么?A洗澡B吃饭C看电视√
最新回复
(
0
)