网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
结构声明 struct S1{int x; char y; int z;};,考虑数据对齐要求,则整个结构的大小为()字节。
A

8

B

9

C

12

D

14


参考答案

参考解析
解析: 暂无解析
更多 “单选题结构声明 struct S1{int x; char y; int z;};,考虑数据对齐要求,则整个结构的大小为()字节。A 8B 9C 12D 14” 相关考题
考题 下面结构体的定义语句中,错误的是A)struct ord {int x;int y;int z;}; struct 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;

考题 设有以下说明语句struct ex{ int x ; float y; char z ;} example;则下面的叙述中不正确的是A.struct结构体类型的关键字B.example是结构体类型名C.x,y,z都是结构体成员名D.struct ex是结构体类型名

考题 ● 给定 C 语言的数据结构struct T {int w;union T { char c; int i; double d; } U;};假设 char 类型变量的存储区大小是 1 字节,int 类型变量的存储区大小是 4 字节,double类型变量的存储区大小是 8 字节,则在不考虑字对齐方式的情况下,为存储一个 struct T类型变量所需要的存储区域至少应为 (15) 字节。(15)A. 4B. 8C. 12D. 17

考题 下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int y;int z;};struct ord a;B.struct ord{int x;int y;int z;};ord a;C.struct ord{int x;int y;int z;}a;D.struct{int x;int y;int z;}a;

考题 给定C语言的数据结构struct T { int w; union T { char c;int i;double d;)U; }; 假设char类型变量的存储区大小是1字节,int 类型变量的存储区大小是4字节, double 类型变量的存储区大小是8字节,则在不考虑字对齐方式的情况下,为存储一个 struct T类型变量所需要的存储区域至少应为(15)字节。A.4B.8C.12D.17

考题 下面结构体的定义语句中,错误的是( )。 A.struct ord{int x;int Y;int Z;};struet ord a;SXB 下面结构体的定义语句中,错误的是( )。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;

考题 若某C语句如下: struct ex {int x;float y;char z;}example; 则以下叙述中不正确的是(29)。A.struct结构体类型的关键字B.x,y,z都是结构体成员名C.stmct ex是结构体类型D.example是结构体类型名

考题 假定一个结构类型的定义为“struct B{int a[5]; char* b;};",则该类型的大小为_____字节。

考题 下列对结构及其变量定义错误的是( )。A.struct My StructB.struct MyStruct{ {int num; int num;char ch; char ch;} }My;C.strutD.struct{ {int num; int num;char ch; char ch;}My; };

考题 下列程序的输出结果是()。includemain(){struct st{int y,x,z;};union{long i; int j; 下列程序的输出结果是( )。 #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,2B.6,4C.8,4D.8,6

考题 设有以下C语言说明语句:struct ex{int x;float y;char z;} example则下面的叙述中不正确的是(52)。A.struct是结构体类型的关键字B.x、y、z都是结构体成员名C.struet ex是结构体类型D.example是结构体类型名

考题 若定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 struct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

考题 设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。Struct st{ int x;inty;int z;}Struct worker{ char name[20];char sex;struct st birth;}p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

考题 设有下列说明语句: strcut str {int x; float y; char z;}st; 则下列的叙述中不正确的是( )。A.struct是结构体类型的关键字B.st是结构体类型名C.x、y、x都是结构体成员名D.struct str是结构体类型名

考题 下面结构体的定义语句中,错误的是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;

考题 设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 stmct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

考题 有如下程序段#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

考题 下面结构体的定义语句中,错误的是( )。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;

考题 设有以下说明语句: struct ex {int x;float y;char z; }example;在下面的叙述中,不正确的一条是______。A.struct是结构体类型的关键词B.example是结构体类型名C.x,y,2都是结构体成员名D.struct ex是结构体类型

考题 设有以下声明语句 street ex { int x;float y;char z;} example; 则下面的叙述中不正确的是 ______ 。A.struct是结构体类型的关键字B.example是结构体类型名C.x,y,z都是结构体成员名D.struct ex是结构体类型

考题 设有下列说明语句:strcut str{int x;float y;char z;}st;则下列的叙述中不正确的是( )。A.struct是结构体类型的关键字B.st是结构体类型名C.x、y、z都是结构体成员名D.struct str是结构体类型名

考题 设有以下声明语句 struct ex { int x;float y;char z;}example; 则下面的叙述中不正确的是______。A.struct是结构体类型的关键字B.example是结构体类型名C.x,y,z都是结构体成员名D.struct ex是结构体类型

考题 下列对结构及其变量定义错误的是( )。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; };

考题 设有说明:char w;int x;float y;double z;则表达式w*x+z-y 值的数据类型为().A、floatB、charC、intD、double

考题 假定一个结构类型的定义为”struct B{int a[4]; char *b;};”,则该类型的大小为()个字节。

考题 结构声明 struct S1{int x; char y; int z;};,考虑数据对齐要求,则整个结构的大小为()字节。A、8B、9C、12D、14

考题 单选题下面结构体的定义语句中,错误的是(  )。A struct ord{int x;int y;int z;};struct 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;