[单选题]

已知: union { int i; char c; float a; }st;则sizeof(st)的值是______。

A.4

B.5

C.6

D.7

参考答案与解析:

相关试题

已知有变量datal定义如下: union data { int i; char

[单选题]已知有变量datal定义如下: union data { int i; char ch; float f; }datal; 则变量datal所占的内存存储空间可表示为(57)。A.sizeof(int)B.sizeof(char)C.sizeof(float)D.SiZCOf(mt)+sizeof(char)+sizeof(float)

  • 查看答案
  • 已知:char a;int b;float c;double d;执行语句“c=

    [单选题]已知:char a;int b;float c;double d;执行语句“c=a+b+c+d;”后,变量c的数据类型是( )。A.int B.char C.float D.double

  • 查看答案
  • 已知char a; int b; float c; double d; 则表达式

    [单选题]已知char a; int b; float c; double d; 则表达式a*b+c-d结果为A.doubleB.intC.floatD.char

  • 查看答案
  • 若有以下定义和语句union data{ int i; char c; floa

    [单选题]若有以下定义和语句union data{ int i; char c; float f; } x;int y;则以下语句正确的是A.)x=10.5;B.)x.c=101;C.)y=x;D.)printf("%d/n",x);

  • 查看答案
  • 若有以下定义和语句 union date { int i; char c; fi

    [单选题]若有以下定义和语句 union date { int i; char c; fioat f;} x; int y; 则以下语句正确的是______。A.x=10.5;B.x.c=101;C.y=x;D.printf("%d/n",x);

  • 查看答案
  • 已知char a;int b;float c;double d;则表达式a*b£

    [单选题]已知char a;int b;float c;double d;则表达式a*b+c-d结果为A.doubleB.intC.floatD.char

  • 查看答案
  • 已知char a;int b;float C;double d;则表达式a£­b

    [单选题]已知char a;int b;float C;double d;则表达式a-b c-d结果为( )型。A.)doubleB.)floatC.)intD.)char

  • 查看答案
  • union dt{int a;char b;double c;}data;以下叙

    [单选题]union dt { int a;char b;double c; }data; 以下叙述中错误的是( )。A.data的每个成员起始地址都相同B.变量data所占内存字节数与成员c所占字节数相等C.程序段:data.a=5;printf("%f/n",data. C);输出结果为5.0D.data可以作为函数的实参

  • 查看答案
  • 有以下程序 main( ) { int a; char c=10; float

    [单选题]有以下程序main( ){ int a; char c=10;float f=100.0; double x;a=f/=c*=(x=6.5);printf("%d %d %3.1f %3.1f/n",a,c,f,x);}程序运行后的输出结果是A.1 65 1 6.5B.1 65 1.5 6.5C.1 65 1.0 6.5D.2 65 1.5 6.5

  • 查看答案
  • 设有定义“struct {int a; float b; char c;} ab

    [主观题]设有定义“struct {int a; float b; char c;} abc, *p_abc=&abc;”,则对结构体成员a的引用方法可以是abc.a和p_abca。

  • 查看答案
  • 已知: union { int i; char c; float a; }st;