网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
sizeof(double)的结果值是()。
- A、8
- B、4
- C、2
- D、出错
参考答案
更多 “sizeof(double)的结果值是()。A、8B、4C、2D、出错” 相关考题
考题
若有下列说明和语句,已知int型数据占2个字节,则下列语句的输出结果是( )。stmct st{char a[15];intb;double c;};printf("%d",sizeof(structSt));A.15B.8C.25D.2
考题
若有下列说明和语句,已知int型数据占2个字节,则下列语句的输出结果是( )。stmct st{ char a[15];int b;double c;};printf("%d",sizeof(struct st));A.15B.8C.25D.2
考题
下面程序的输m结果是( )。 typedef union {double x[3]; int y[4]; char z[10]; }M; M t; main() { Printf("%d\n",sizeof(t));}A.32B.26C.24D.4
考题
若定义了以下函数: void f(……) { …… *p=(double *)malloc(10 * sizeof(double)); …… } p是该函数的形参,要求通过p把动态分配存储单元的地址传回主调函数,则形参p的正确定义应当是( )A.double *pB.float **pC.double **pD.float *p
考题
设有以下说明和定义:typedef union {long i; int k[5]; char c;} DATE;struct data { int cat; DATE cow; double dog;} too;DATE max;则语句 printf("%d",sizeof(struct date)+sizeof(max));的执行结果是:___52____
考题
设有以下定义和语句,输出的结果是(用small模式编译,指针变量占2个字节)______。 struct date { long*cat; struct date *next; double dog; }too; printf("%d",sizeof(too));A.20B.16C.14D.12
考题
若有下面的说明和定义,则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
考题
下面一组中都是C语言关键字的是______。A.double Int forB.main while gotoC.volatile break staticD.malloc sizeof new
考题
设有以下说明和定义:includeVoid main() {typedef union{long i; int k[5]; char
设有以下说明和定义:#include<iostream. h>Void main() {typedef union{long i; int k[5]; char c;}DATE;struct date{iNt cat; DATE cow; double. dog;}too;DATE max;则下列语句的执行结果是( )。cout<<(sizeof(struct date)+sizeof(max))<<end1;}A.26B.52C.18D.8
考题
在下列基类的定义中,有无virtual修饰use成员函数的结果将不同,其原因是______。当use( )为虚拟函数时的程序执行结果:sizeof(A)=8sized(B)=12sizeof(C)=16当use( )非虚拟函数时的程序执行结果:sizeof(A)=4sized(B)=8sizeof(C)=12源程序如下:include<iostream.h>class Grandad{public:Grandad( ):money(10){}int money;virtual void use( ){}};class Father:public Grandad{public:Father( ):money(100){}int money;void use( ){}};class Son:public Father{public:Son( ):money(300){}int money;void use( ){}};void main(void){Grandad A;Father B;Son C;cout<<"sizeof(A)="<<sizeof(A)<<endl;cout<<"sizeof(B)="<<sizeof(B)<<endl;cout<<"sizeof(C)="<<sizeof(C)<<endl;}
考题
设有以下说明和定义:typedef union{ long i;int k[5];char c; } DATE;struct date{ int cat;DATE cow;double dog; }too;DATE max;则下列语句的执行结果是______。printf("%d",sizeof (struct date) +sizeof(max));A.26B.30C.18D.8
考题
设有以下定义或语句,则输出的结果是(用small模式编译,指针变量占2个字节) struct date { long * cat; struct date * next; double dog; { too; printf(" % d",sizeof(too));A.20B.16C.14D.12
考题
经下列语句定义后,sizeof(x)、sizeof(y)、sizeof(a)、sizeof(b)在IBM-PC机上的值分别为______。char x=65;float y=7.3;int a=100;double b=4.5;A.2,2,2,4B.1,2,2,4C.1,4,2,8D.2,4,2,8
考题
设有以下定义: typedef union {long i;int k[5];char c,}DATE, struct date {int cat;DATE cow;double dog;}too; DATE max; 则下列语句的执行结果是( ) printf("%d",stzeof(struct date)+sizeof(max));A.25B.30C.18D.8
考题
若有下面的说明和定义,则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
考题
以下程序的输出结果是______。 struct date { long *a; struct date*next; double b; }too; printf("%d",sizeof(too));A.20B.16C.14D.12
考题
有以下程序,程序运行的结果是 ______。includeincludevoid main(){charx
有以下程序,程序运行的结果是 ______。 #include<iostream.h> #include<string.h> void main(){ char x[]= "C++" ,y[10]= "C++" ; cout<<sizeof(x)/sizeof(char)<<“,”<<sizeof(y)/sizeof(char); }A.3 3B.4 4C.4 10D.10 10
考题
若有如下定义和声明: struct s { int m;char ch;double x; union t {char a[6];int b[3];}tt;}ss; 则sizeof(struets)的值是( )A.6B.14C.17D.20
考题
有以下程序: #includestdio.h main { int S,t,A=10;double B=6; S=sizeof(A);t=sizeof(B); printf("%d,%d\n",S,t); } 在VC6平台上编译运行,程序运行后的输出结果是( )。A.2,4B.1,4C.4,8D.10,6
考题
在以下程序段中,已知血型数据占两个字节,则输出结果是 union un { int i; double y; } struct st { char a[10]; union un b; }; printf("%",sizeof(struct st));A.14B.18C.20D.16
考题
若有下面的说明和定义: union un { char s[10]; long d[3]; }ua; struet std { char c[10];double d;int a; union un vb; }a;则printf("%d\n", sizeof(struct std)+sizeof(union un));输出的值为______。A.34B.52C.54D.64
考题
有数组定义double d[10];以下叙述不正确的是()A、数组d有10个元素B、数组d的最后一个元素是d[10]C、数组d的第一个元素*dD、数组d的字节数是sizeof(double)*10
考题
设已定义浮点型变量data,以二进制代码方式把data的值写入输出文件流对象outfile中,正确的语句是()A、outfile.write((double*)data,sizeof(double));B、outfile.write((double*)data,data);C、outfile.write((char*)data,sizeof(double));D、outfile.write((char*)data,data);
考题
关于printf(“%d”,sizeof(sizeof(1)));输出结果是()A、2B、4C、6D、8
热门标签
最新试卷