首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序的输出结果是 #include<stdio.h> struct st { int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0
以下程序的输出结果是 #include<stdio.h> struct st { int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0
admin
2009-02-15
7
问题
以下程序的输出结果是 #include<stdio.h> struct st { int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[0],60,&dt[0],60,&dt[0],}; main() { p=aa; printf("%d\n",++(p->x));}
选项
A、10
B、11
C、51
D、60
答案
4
解析
通过指针来引用结构体成员的方法是 (指针变量)->结构体成员名。注意:结构体变量中的数据引用。
转载请注明原文地址:https://jikaoti.com/ti/iBK0FFFM
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
以下关于单选按钮和复选框的叙述中,正确的是( )。
可设置文字字体为斜体的属性是()。
已知变量x、Y为整数型,且x=4,y=12,s为字符串型,且s=a,LblOk为标签控件,下列赋值语句不合法的是()。
(1)在名称为Form1,标题为“练习”的窗体上添加一个名称为Framel、标题为“效果”的框架。框架内含有三个复选框,其名称分别为Chk1、Chk2和Chk3,标题分别为“倾斜”、“加粗”和“下划线”。程序运行后的窗体如图所示。
(1)考生文件夹下有一个工程文件sjt3.vbp。程序的功能是:通过键盘向文本框中输入数字,如果输入的是非数字字符,则提示输入错误,且文本框中不显示输入的字符。单击名称为Command1、标题为“添加”的命令按钮,则将文本框中的数字添加到名称为Combol
(1)请在名称为Forml的窗体上添加一个名称为H1的水平滚动条,并在属性窗口中设置它的属性值,使其满足下列要求:它的最小刻度值为1,最大刻度值为100,在程序运行时,用鼠标单击滚动条上滚动框以外的区域(不包括两边按钮),滚动框移动10个刻度。再在滚动条下
在考生文件夹下有一个_工程文件sjt5.vbp,按照要求完成以下操作:在名称为Forml的窗体上添加两个命令按钮,其名称分别为C1和C2,标题分别为“读入数据”和“计算”(如图所示)。程序运行后,如果单击“读入数据”按钮,则调用题目所提供的Rea
假定建立了一个名为Commandl的命令按钮数组,则以下说法中错误的是
命令按钮Command1的单击事件过程如下:PrivateSubCommand1_Click()Dima(10,10)AsIntegerx=0Fori=1To3Forj=1To3
以下能从字符串“VisualBasic”中直接取出子字符串“Basic”的函数是
随机试题
注射时用70%的酒精消毒是使细菌蛋白质
DNA的三级结构是半保留复制的结构基础是
免疫荧光检查结果阴性的疾病有
A.干扰核酸代谢的药物B.直接影响和破坏DNA结构及功能的药物C.周期非特异性抗肿瘤抗生素D.影响微管蛋白质装配和纺锤体丝形成的药物E.影响体内激素平衡,发挥抗肿瘤作用的药物环磷酰胺
消化液中最重要的是
A.乳白色B.黄褐色C.棕色D.黄色E.酱油色胆红素尿的颜色
对于实施入境验证的商品,检验检疫机构对其认证文件进行验证,必要时对其货证的相符性及认证标记进行查验。( )
银行职业道德的基本要求是( )。
翻译下面的一段古文。(首都师范大学2014)昔齐人有欲金者,清旦衣冠而之市,适鬻金者之所,因攫其金而去,吏捕得之,问曰:人皆在焉,子攫人之金何?对曰:取金之时,不见人,徒见金。(《列子·说符》)
Theroleofgovernmentsinenvironmentalmanagementisdifficultbutinescapable.Sometimes,thestatetriestomanagetheresou
最新回复
(
0
)