题目内容 (请给出正确答案)
[单选题]

下面C语言语句定义了_________。 struct student{ int num; char name[20]; char sex; }s1,s2;

A.结构类型s1,s2

B.结构类型标签student和结构变量s1,s2

C.结构变量student

D.链表student

提问人:网友a370893766 发布时间:2022-01-07
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
网友答案
查看全部
  • · 有4位网友选择 D,占比44.44%
  • · 有2位网友选择 C,占比22.22%
  • · 有2位网友选择 A,占比22.22%
  • · 有1位网友选择 B,占比11.11%
匿名网友 选择了D
[31.***.***.171] 1天前
匿名网友 选择了D
[118.***.***.85] 1天前
匿名网友 选择了C
[172.***.***.201] 1天前
匿名网友 选择了D
[69.***.***.124] 1天前
匿名网友 选择了A
[69.***.***.14] 1天前
匿名网友 选择了C
[168.***.***.36] 1天前
匿名网友 选择了B
[142.***.***.53] 1天前
匿名网友 选择了A
[234.***.***.100] 1天前
匿名网友 选择了D
[240.***.***.194] 1天前
加载更多
提交我的答案
登录提交答案,可赢取奖励机会。
更多“下面C语言语句定义了_________。 struct st…”相关的问题
第1题
已知学生记录描述为: struct student { int no ; char name[20]; char sex; struct { int year; int month ; int day ; } birth; } s; 设结构变量s中的“birth”应是“1985年10月1日”,则下面正确的赋值是( )。

A、year=1985; month=10; day=1;

B、birth.year=1985; birth.month=10; birth.day=1;

C、s.year=1985; s.month=10; s.day=1;

D、s.birth.year=1985; s.birth.month=10; s.birth.day=1;

点击查看答案
第2题
设struct student

{

char name [20];

char sex;

}stu;

语句printf("%d\n",sizeof(stu));的输出结果是______。

点击查看答案
第3题
已有定义和声明: struct student {int no; char name[20]; struct {int year,month,day; }birth; }s; 若要求将日期"1989年11月12日"保存到变量s的birth成员中,则能实现这一功能的程序段是( ).

A、s.birth.year=1989; s.birth.month=11; s.birth.day=12;

B、s.year=1989; s.month=11; s.day=12;

C、year=1989; month=11; day=12;

D、birth.year=1989; birth.month=11; birth.day=12;

点击查看答案
第4题
若有以下定义:struct STU { char name[20]; char sex; int age; }s1; 则下面输入语句不正确的是_____

A、scanf("%s",s1.name);

B、scanf("%c",&s1.sex);

C、scanf("%d",&s1.age);

D、scanf("%c",&s1);

点击查看答案
第5题
设有如下定义: struct employee { int emp_no; char sex; char name[20]; float salary;}; 此结构体的变量所占内存空间大小为( )字节。

A、26

B、27

C、28

D、29

点击查看答案
第6题
设有如下定义 struct ss { char name[10]; int age; char sex; } std[3],*p=std; 下面各输入语句中错误的是

A.scanf("%d",&(*p).age);

B.scant("%s",&std.name);

C.scanf("%c",&std[0].sex);

D.scanf("%c",&(p->sex));

点击查看答案
第7题
设有变量定义 struct stu { int age; int num; }std,*p=&std; 能正确引用结构体变量std中成员age的表达式是_______。

A、(*p).age

B、std->age

C、*std->age

D、*p.age

点击查看答案
第8题
下列程序执行后输出的结果是_______。 int main(void){ char *a[6]={"AB","CD","EF","GH","IJ","KL"}; int i; for(i=0;i<4;i++) printf("%s",a[i]); printf("\n"); return 1; }> A、ABCDEFGH

B、ACEG

C、EGIK

D、EFGHIJKL

点击查看答案
第9题
下面有关结构体相关说明正确的是________。 typedef struct date { int year, month, day; } type_date ;

A、定义了结构体类型名type_date

B、定义了结构体变量type_date

C、定义了结构体type_date

D、这个定义是错误的

点击查看答案
第10题
下列程序的输出结果是_______。 struct student {int math, phi, eng;}; int main(void){ struct student s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].math+s[1].phi; printf("%d\n",t); return 1; }

A、6

B、5

C、7

D、8

点击查看答案
账号:
你好,尊敬的用户
复制账号
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
简答题
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反简答题购买须知被冻结。您可在“简答题”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
简答题
点击打开微信