题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-02 22:15:03

[单项选择]若有以下定义的语句:
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 a"的相关试题:

[单项选择]若有以下定义的语句:
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 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 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 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;
[填空题]若有以下定义及初始化语句:
int i=100;
int *ip=&i;
int k=*ip;
并假设整型数i的地址为0x12345678,指针ip的地址为0x21000000,则k的值为______。
[单项选择]若有以下定义(设int类型变量占2个字节)
int i=8,j=9:
则以下语句:
printf("i=%%d,j=%%%d/n",i,j);
输出的结果是()。
A. i=8,j=9
B. i=%d,j=%8
C. i=%d,j=%d
D. 8,9
[单项选择]对下列结构体变量stu的成员引用不正确的是( )
struct student
int m;float n;stu,*p;
A. p.stu.n
B. P->m
C. (*p).m
D. stu.n
[填空题]若有以下定义: char a;int b; float c;double d; 则表达式a*b+d-c值的类型为 【7】
[单项选择]若有定义:static int fun(int a,int b),则以下叙述中错误的是( )。
A. 定义了一个返回值为整型的静态函数
B. 该函数只能被同一文件内的函数调用
C. 该函数可以在任何文件中被调用
D. 该函数属于内部函数
[单项选择]若有以下定义:
char a;int b;
float c:double d;
则表达式a*b+b-c值的类型为( )。
A. float
B. int
C. char
D. double
[单项选择]若有以下定义,说法错误的是( )。int a=100,*p=&a;
A. 声明变量p,其中*表示p是一个指针变量
B. 变量p经初始化,获得变量a的地址
C. 变量p只可以指向一个整型变量
D. 变量p的值为100
[单项选择]若有以下结构体定义,则是正确的引用或定义。
struct example
int x;
int y;
v1;
A. example.x=10
B. examplev2.x=10
C. struct v2;v2.x=10
D. struct example v2=10;
[单项选择]若有以下定义:char a; int b; float c; double d; 则表达式a*b+d-c值的类型为______。
A. float
B. int
C. char
D. double
[单项选择]若有以下定义:
int x[10],*pt=x;
则对x数组元素的正确引用是
A. *&x[10]
B. *(x+3)
C. *(pt+10) D) pt+3

我来回答:

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

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码