题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-01-12 21:47:22

[单选题]以下结构体类型说明和变量定义中正确的是()。
A.typedef struct
{int n; char c;} REC;
REC t1,t2;
B.struct REC;
{int n; char c;};
REC t1,t2;
C.typedef struct REC;
{int n=0; char c= 'A';}t1,t2;
D.struct
{int n; char c;} REC;
REC t1,t2;

更多"[单选题]以下结构体类型说明和变量定义中正确的是()。"的相关试题:

[单选题]以下对结构体类型变量td的定义中,错误的是()。
A.typedef struct aa
{ int n;
Float m;
}AA;
AA td;
B.struct aa
{ int n;
Float m;
};
Struct aa td;
C.struct
{ int n;
Float m;
}aa;
Struct aa td;
D.struct
{ int n;
Float m;
}td;
[单选题]有以下结构体说明、变量定义和赋值语句
Struct STD
{ char name[10];
Int age;
Char sex;
}s[5],*ps;
Ps=&s[0];
则以下scanf函数调用语句中错误引用结构体变量成员的是()。
A.scanf("%s",s[0].name);
B.scanf("%d",&s[0].age);
C.scanf("%c",&(ps->sex));
D.scanf("%d",ps->age);
[单选题]以下对结构体类型变量的定义中,不正确的是()。
A.typedef struct aa { int n; AA float m; }AA;
B.#define AA struct aa {int n; float m; }td1; AA td1;
C.struct { int n; float m; }aa; stuct aa td1;
D.struct { int n; float m; }td1;
[单选题]有以下结构体说明和变量定义,如图所示:
Struct node
{int data; struct node *next;} *p,*q,*r;
现要将q所指结点从链表中删除,同时要保持链表的连续,以下不能完成指定操作的语句是()。
A.p->next=q->next;
B.p->next=p->next->next;
C.p->next=r;
D.p=q->next;
[单选题]以下对结构体类型变量的定义中,不正确的是()。
①typedef struct aa
{
Int n;
Float m;
}AA;
AA td1;
②#define AA struct aa
AA{
Int n;
Float m;
}td1;
③struct
{
Int n;
Float m;
}aa;
Struct aa td1;
④struct
{
Int n;
Float m;
}td1;
A.①
B.②
C.③
D.④
[单选题]有以下结构体说明和变量定义,如下图所示,指针p、q、r分别指向一个链表中的三个连续结点。
Struct node
{ int data;
Struct node *next;
}*p,*q,*r;
Data next data next data next
┌─┬─┐ ┌─┬─┐ ┌─┬─┐
─→│ │ ┼→│ │ ┼→│ │ ┼→
└─┴─┘ └─┴─┘ └─┴─┘
↑p ↑q ↑r
现要将q和r所指结点的先后位置交换,同时要保持链表的连续,以下错误的程序段是()。
A.r->next=q;q->next=r->next;p->next=r;
B.q->next=r->next;p->next=r;r->next=q;
C.p->next=r;q->next=r->next;r->next=q;
D.q->next=r->next;r->next=q;p->next=r;
[单选题]以下选项中,能定义m为合法的结构体变量的是()。
A.typedef struct abc
{ double a;
Char b;
} m;
B.struct
{ double a;
Char b;
}m;
C.struct ABC
{ double a;
Char b;
}
ABC m;
D.typedef ABC
{ double a;
Char b;
}
ABC m;
[单选题]以下选项中,能定义s为合法的结构体变量的是()。
A.typedef struct abc
{ double a;
Char b[10];
} s;
B.struct
{ double a;
Char b[10];
}s;
C.struct ABC
{ double a;
Char b[10];
}
ABC s;
D.typedef ABC
{ double a;
Char b[10];
}
ABC s;
[单选题]以下选项中不能正确把cl定义成结构体变量的是()。
1) typedef struct
{int red;
Int green;
Int blue;
} COLOR;
COLOR cl;
2) struct color cl
{ int red;
Int green;
Int blue;
};
3) struct color
{ int red;
Int green;
Int blue;
}cl;
4) struct
{int red;
Int green;
Int blue;
}cl;
A.1
B.2
C.3
D.4
[判断题]指针变量定义后可以指向任何类型的不同变量。
A.正确
B.错误
[判断题]指针变量定义后仅可以指向与之同类型的不同变量。
A.正确
B.错误
[单选题]定义无符号长整型变量的类型说明符是( )
A.Unsinged
B.Unsinged int
C. Long
D. Unsinged long
[单选题]以下对结构体变量stu1中成员age的非法引用是()。 struct student { char name[10]; int age ; } stu1 ,*p; p=&stu1;
A.stu1.age
B.p->age
C.(*p).age
D.student.age
[填空题]共用体类型变量的定义关键字是()__。
[判断题]工业机器人后台通信编程包括工业机器人后台任务创建、自定义数据类型及通信数据变量定义等内容。
A.正确
B.错误
[填空题]结构体类型变量的定义方式共有()____种。
[单选题]下列变量定义错误的是
A.int a;
B.double b=4.5;
C.boolean b=true;
D.float f=9.8;
[判断题]工业机器人端通信数据变量定义完成后,通信数据变量可以直接使用,无需初始化。
A.正确
B.错误
[单选题]下列变量定义中合法的是()。
A.short _a=1-.le-1;
B.double b=1+5e2.5;
C.long do=0xfdaL;
D.float 2_and=1-e-3;

我来回答:

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

订单号:

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