题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-11-01 19:17:25

[单项选择]有以下说明和定义语句
struct student
int age;char num 8;;
struct student stu[3]=20,“200401”,21,“200402”),19,“200403”;
struct student *p=stu;
以下选项中引用结构体变量成员的表达式错误的是
A. (p++)->num
B. p->num
C. (*p).num
D. stu[3].age

更多"有以下说明和定义语句struct student int age;ch"的相关试题:

[单项选择]有以下说明和定义语句
struct student
int age;char num 8;;
struct student stu[3]=20,“200401”,21,“200402”),19,“200403”;
struct student *p=stu;
以下选项中引用结构体变量成员的表达式错误的是
A. (p++)->num
B. p->num
C. (*p).num
D. stu[3].age
[单项选择]若有以下定义的语句:
struct student
int age;
int num;;
struct student stu[3]=1001,20,1002,19,1003,21;
main( )
struct student *p;
p=stu;

则以下不正确的引用是( )。
A. (p++)->num
B. p++
C. (*p).num
D. P=&stu.age.
[单项选择]有以下说明和定义语句
struct student
int age;char num[8];
struct student stu[3]=20,"200401",21,"200402",19,"200403";
struct student *p=stu;;
以下选项中引用结构体变量成员的表达式错误的是
A. (p++)->num
B. p->num
C. (*p).num
D. stu[3].age
[单项选择]

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


A. year=1989; month=11;day=12;
B. s.year=1989;s.month=11;s.day=12;
C. birth.year=1989;birth.month=11;birth.,day=12;
D. s.birth.year=1989;s.birth.month=11;s.birth.day=12;
[单项选择]已知学生记录描述为:
struct student
int no;
char name[20],sex;
struct
int year,month,day;
birth;
;
struct student s;
设变量s中的“生日”是“1984年11月12日”,对“birth”正确赋值的程序段是( )。
A. year=1984;month=11;day=12;
B. s.year=1984;s.month=11;s.day=12;
C. birth.year=1984;birth.month=11;birth.day=12;
D. s.birth.year=1984;s.birth.month=11;s.birth.day=12;
[单项选择]若有如下程序段:
struct student
int num;float score;
stu[3]=10,85,60,58,32,23;
main( )
struct student*t;
t=stu;

则下面表达式中值为58的是( )。
A. (*t).num
B. *(t++)->num
C. (*++t)score
D. (++t)->score
[单项选择]若有结构体定义:
struct stuint num;
char sex;
int age;
a1,a2;
则下列语句中错误的是( )。
A. printf("%d,%c,%d",a1);
B. a2.age=a1.age;
C. a1.age++;
D. a1.num=5;
[单项选择]设有如下定义
struct ss
char name[10];
int age;
char sex;
std[3], * p=std;
下面各输入语句中错误的是
A. cin>>(* p).age);
B. cin>>std.name);
C. cin>>std[0].sex);
D. cin>>(p->.sex));

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码