首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有以下程序 struct S{int a;int b;}; main(){ struct S a,*p=&a; a.a=99; printf("%d\n",_______);}程序要求输出结构体中成员a的数据,以下不能填入横线处的内容是
有以下程序 struct S{int a;int b;}; main(){ struct S a,*p=&a; a.a=99; printf("%d\n",_______);}程序要求输出结构体中成员a的数据,以下不能填入横线处的内容是
admin
2020-05-19
25
问题
有以下程序
struct S{int a;int b;};
main(){
struct S a,*p=&a;
a.a=99;
printf("%d\n",_______);}程序要求输出结构体中成员a的数据,以下不能填入横线处的内容是
选项
A、a.a
B、*p.a
C、p->a
D、(*p).a
答案
B
解析
如果p指向结构体,那么下面三种形式都可以访问结构体的成员:结构体变量.成员名、(*p).成员名、p->成员名。
转载请注明原文地址:https://kaotiyun.com/show/E8Cp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
下列程序的运行结果是()。#include<stdio.h>voidsub(int*s,int*y){staticintm=4;*y=s[0];m++;}voidma
下列叙述中错误的是()。
给定程序MODI1.C中函数fun的功能是:输出M行M列整数方阵,然后求两条对角线上元素之和,返回此和数。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构!1#inclu
某二叉树中度为2的结点有10个,则该二叉树中有()个叶子结点。
下列给定程序的功能是调用fun函数建立班级通信录。通信录中记录每位学生的编号、姓名和电话号码。班级人数和学生信息从键盘读入,每个人的信息作为一个数据块写到名为myfile5.dat的二进制文件中。请在程序的下画线处填入正确的内容并将下画线删除,使
下列给定程序中函数fun的功能是:把从主函数中输入的3个数,最大的数放在a中,中间的数放在b中,最小的数放在c中。例如,若输入的数为:551234,输出的结果应当是:a=55.0,b=34.0,c=12.0。请改正程序中的错误,使
下列叙述中正确的是()。
下列叙述中正确的是()。
关于静态变量的叙述中错误的是()。
检查软件产品是否符合需求定义的过程称为()。
随机试题
预制构件应按吊装次序和方向水平分层推放,堆放时层数,一般不宜超过()层。
下列关于支架现浇法施工风险控制措施中,错误的是()。
每日终了,由出纳员清点核对现金的工作,属于( )。
仲裁不公开进行,即以()原则。
组织结构设计后的实施要则包括()。
下列不属于高中语文课程基本理念的是()。
艾利斯提出的心理辅导方法是()。
下列关于局域网的描述中,正确的是
TheAmericandreamismost______duringtheperiodsofproductivityandwealthgeneratedbyAmericancapitalism.
A、Priorityofstudents’academicachievements.B、Equaleducationopportunitiestoallchildren.C、Socialequalitybetweenteache
最新回复
(
0
)