网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
如下定义的结构类型变量 a 所占内存字节数是() union U { char st[4]; short i; long l; }; struct A { short c; union U u; } a;
A.4
B.5
C.6
D.12
参考答案和解析
6
更多 “如下定义的结构类型变量 a 所占内存字节数是() union U { char st[4]; short i; long l; }; struct A { short c; union U u; } a;A.4B.5C.6D.12” 相关考题
考题
若有以下说明和定义语句,则变量w在内存中所占的字节数是 【19】 。union aa {float x; float y; char c[6]; };struct st{ union aa v; float w[5]; double ave; } w;
考题
若有下面说明和定义:struct test{ int m1;char m2;float m3;union uu(char u1[5];int u2[2];)ua;}myaa; 则sizeof(struct test)的值是( )。A)20 B)16C)14 D)9
考题
● 给定 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
考题
●在某嵌入式系统中,采用PowerPC处理器,若定义了如下的数据类型变量X,则X所占用的内存字节数是(52).union data{int i;char ch;double f;} X;(52) A.8B.3c.16D.24
考题
变量a所占内存字节数是______。 union U { char st[4]; int i; long 1; }; struct A { int c; union U u; }a;A.4B.5C.6D.8
考题
下列程序的输出结果是()。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
考题
若有如下说明和定义struct test{ int ml; char m2; float m3; union uu {char ul[5]; int u2[2];} ua;} myaa;则sizeof(struct test)的值是A.12 B.16 C.14 D.9
考题
若有下面的说明和定义,则sizeof(struct aa) 的值是 struct aa { int rl;double r2;float r3; union uu {char ul [5];long u2[2]}ua; }mya;A.30B.29C.24D.22
考题
若有下面的说明和定义,则sizeof(struct aa)的值是______。 struct aa { int r1;double r2;float r3; union uu{char ul[5]long u2[2]}ua; }mya;A.30B.29C.24D.22
考题
下列程序的输出结果是( )。 include main() { struct st { int y,x,z; }; union {long
下列程序的输出结果是( )。 #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
考题
变量a所占的内存字节数是 ______。A.4B.5C.6D.8 union U { char st[4]; int i; long l; }; Struct A{ int c; union U u; }a;
考题
在下列定义中的共用体所占内存字节数是( )。 union { char k[6]; struct { int m; floar f; }a; double d; }b;A.8B.14C.18D.10
考题
有如下程序段#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
考题
若有下面的说明和定义,则sizeof(struct aa)的值是 struct aa { int rl;double r2;float r3; union uu{char u1[5];long u2[2];}ua; } mya;A.30B.29C.24D.22
考题
下面程序的输出结果是_______。 union un { int a[4]; long b; char c[6];} main() { union un u; printf("%d%d",sizeof(u),sizeof(uA) ); }A.82B.88C.188D.182
考题
若有下面的说明和定义,则sizeof(struct aa)的值是( )。 struct aa { int r1; double r2; float r3; union uu{char u1[5];long u2[2];}ua; } mya;A.30B.29C.24D.22
考题
以下程序的输出结果是includemain(){ union un{ int i;long k;char c;};struct byte{i
以下程序的输出结果是 #include<stdio.h> main() { union un{ int i; long k; char c;}; struct byte{ int a; long b; union un c;}r; printf("%d\n",sizeof(r));}A.10B.13C.7D.8
考题
变量a所占的内存字节数是______。 union U { char st[4]; int i; long 1; }; struct A { int c; union U u; }a;A.4B.5C.6D.8
考题
若有下面的说明和定义,则sizeof(structaA) 的值是_______。 struct aa { intrl;double r2;float r3; union uu{char u1[5];long u2[2]}ua; }mya;A.30B.29C.24D.22
考题
以下程序的输出结果是() includemain(){ union un{int i; long k; char c;};struct by
以下程序的输出结果是( ) # include<stdio.h> main() { union un{int i; long k; char c; }; struct byte{ int a; long b; union un c; } r; printf("%d\n",sizeof(r)); }A.10B.13C.7D.8
考题
下列程序段的输出是( ) typedef union{ long x[2]; short y[4][5]; char z[10]; }TYPE1; TYPE1 u1; printf("%d\n", sizeof(u1));A.8B.10C.40D.58
考题
若有下面的说明和定义,则sizeof(struct aA) 的值是( ) struet aa { int r1;double r2 float r3; union uu{char u1[5]; long u2[2]; }ua; } mya;A.30B.29C.24D.22
考题
若有下面的说明和定义: struct test { char m2; float m3; union uu{ char u1[5]; float u2; }ua; }MyStruct; 则sizeof(MyStruct)的值是( )。A.10B.11C.12D.9
考题
填空题设有以下结构类型说明和变量定义,则变量a在内存所占字节数是(). struct stud { char num[8]; int s[4]; double ave; } a,*p;
热门标签
最新试卷