结构声明 struct S1{int x; char y; int z;};,考虑数据对齐要求,则整个结构的大小为()字节。
第1题:
下面结构体的定义语句中,错误的是( )。
A.struct ord{int x;int Y;int Z;};struet ord a;
B.struct ord{int x;int y;int Z;}struct ord a;
C.struct ord{int X;int Y;int Z;}a;
D.struct{int X;int y;int Z;}a;
第2题:
下列对结构及其变量定义错误的是( )。
A.struct My Struct
B.struct MyStruct{ {int num; int num;char ch; char ch;} }My;
C.strut
D.struct{ {int num; int num;char ch; char ch;}My; };
第3题:
若有如下语句: struct a { char x[10] int y; }s,*t; t=&S; 则对结构体变量s中的成员y的正确引用是( )。
A.a.y;
B.t->y;
C.t.y;
D.*t->y;
第4题:
若定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 struct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;
A.x=1987
B.birth.x=1987;
C.p.birth.x=1987;
D.p.x=1987;
第5题:
设有下列说明语句: strcut str {int x; float y; char z;}st; 则下列的叙述中不正确的是( )。
A.struct是结构体类型的关键字
B.st是结构体类型名
C.x、y、x都是结构体成员名
D.struct str是结构体类型名
第6题:
设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 stmct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;
A.x=1987
B.birth.x=1987;
C.p.birth.x=1987;
D.p.x=1987;
第7题:
下面结构体的定义语句中,错误的是( )。
A.struct ord{int x;int Y;int z;}struct ord a;
B.struct ord{int x;im Y;im z;};struct ord a;
C.struct ord{int x;int Y;int Z;}a;
D.struct{int x;int Y;int z;}a;
第8题:
设有以下声明语句 street ex { int x;float y;char z;} example; 则下面的叙述中不正确的是 ______ 。
A.struct是结构体类型的关键字
B.example是结构体类型名
C.x,y,z都是结构体成员名
D.struct ex是结构体类型
第9题:
设有以下声明语句 struct ex { int x;float y;char z;}example; 则下面的叙述中不正确的是______。
A.struct是结构体类型的关键字
B.example是结构体类型名
C.x,y,z都是结构体成员名
D.struct ex是结构体类型
第10题:
下列语句段中,正确的是( )。
A.struct { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };
B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p=& x.a;
C.street stu { int a; float x[4]; }y={1,1.0}; float data=y.x;
D.struct nd {int a,b; unsigned c[2]=5; };
第11题:
结构声明 struct S1{int x; char y; int z;};,考虑数据对齐要求,则整个结构的大小为()字节。
第12题:
ps.birth.y
s.birth.y
ps->birth.y
(*ps).birth.y
第13题:
若某C语句如下: struct ex {int x;float y;char z;}example; 则以下叙述中不正确的是(29)。
A.struct结构体类型的关键字
B.x,y,z都是结构体成员名
C.stmct ex是结构体类型
D.example是结构体类型名
第14题:
下列程序的输出结果是( )。 #include<stdio.h> main() { struct st { int y,x,z; }; union { long i; int j; char k; }un; printf("%d,%d\n",sizeof(struct st),sizeof(un)); }
A.6,2
B.6,4
C.8,4
D.8,6
第15题:
设有以下C语言说明语句:
struct ex{int x;float y;char z;} example
则下面的叙述中不正确的是(52)。
A.struct是结构体类型的关键字
B.x、y、z都是结构体成员名
C.struet ex是结构体类型
D.example是结构体类型名
第16题:
设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。
Struct st
{ int x;
inty;
int z;
}
Struct worker
{ char name[20];
char sex;
struct st birth;
}p;
A.x=1987
B.birth.x=1987;
C.p.birth.x=1987;
D.p.x=1987;
第17题:
下面结构体的定义语句中,错误的是
A.struct ord{int x;int y;int z;};struet ord a;
B.atruet ord{int x;int y;int z;}struct ord a;
C.struet ord{int x;int y;int z;}a;
D.struct{int x;int y;int z;)a;
第18题:
有如下程序段#include "stdio.h"typedef union{ long x[2]; int y[4]; char z[8];}atx;typedef struct aa { long x[2]; int y[4]; char z[8];} stx;main(){ printf("union=%d,struct aa=%d\n",sizeof(atx),sizeof(stx));}则程序执行后输出的结果是A.union=8,struct aa=8 B.union=8,struct aa=24C.union=24,struct aa=8 D.union=24,struct aa=24
第19题:
设有以下说明语句: struct ex {int x;float y;char z; }example;在下面的叙述中,不正确的一条是______。
A.struct是结构体类型的关键词
B.example是结构体类型名
C.x,y,2都是结构体成员名
D.struct ex是结构体类型
第20题:
下列语句段中,正确的是( )。
A.street { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };
B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p=& x.a;
C.stmct stu { int a; float x[4]; }y={1,1.0}; float data=y.x;
D.struct nd { int a,b; unsigned c[2]=5; };
第21题:
下列对结构及其变量定义错误的是( )。
A.struct My Struct { int num; char ch; }
B.struct MyStruct { int num; char ch; }My;
C.strut { int num; char ch; }My;
D.struct { int num; char ch; };
第22题:
下面的函数声明中,()是“void BC(int a, int b);”的重载函数
第23题:
struct ord{int x;int y;int z;};struct ord a;
struct ord{int x;int y;int z;}struct ord a;
struct ord{int x;int y;int z;}a;
struct {int x;int y;int z;}a;
第24题:
8
9
12
14