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

题目内容 (请给出正确答案)

在VC++6.0环境下,sizeof(int)和sizeof(float)的值分别为()

  • A、2,2
  • B、2,4
  • C、4,4
  • D、4,8

参考答案

更多 “在VC++6.0环境下,sizeof(int)和sizeof(float)的值分别为()A、2,2B、2,4C、4,4D、4,8” 相关考题
考题 下列x的值是 【7】 。int x;x=sizeof 2.25*4;

考题 若有下面说明和定义: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

考题 已知有变量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)

考题 已知: union { int i; char c; float a; }st;则sizeof(st)的值是______。A.4B.5C.6D.7

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

考题 若有下面的说明和定义struct test{ int ml; char m2; float m3;union uu {char ul[5]; int u2[2];} ua;} myaa;则sizeof(struct test )的值是A.12B.16C.14D.9

考题 假设在turboc2.0采用small模式编译如下程序 main() { char a[4]={'a','b'}; char *b="abc"; printf("%d,%d",sizeof(A) ,sizeof(B) ); } 其输出结果为_____。A.4,2B.4,4C.4,3D.2,2

考题 在C++中,下列程序段的输出结果是【 】。int x, a[10];cout<<sizeof(x)<<“”<<sizeof(a)<<“”<<sizeof(float)<<end1

考题 设int a[4];int *p=a,则sizeof (p)和sizeof (a)的值分别是______ 。A.4和4B.16和4C.16和16D.4和16

考题 若指针p已正确定义,要使p指向两个连续的整型动态存储单元,则正确语句是( )A.p=2 *(int *)malloc(sizeof(int));B.p=(int*)calloc(2*sizeof(int));C.p=(int*)malloc(2* sizeof(int));D.p=2 *(int*)calloc(sizeof(int));

考题 设有结构体类型定义: struct try { int one; float two; }*str;若要动态开辟一个结构单元,使指针str指向其首地址,正确的语句是______。A.str=(try*)malloc(sizeof(try));B.*str=(struct try*)malloc(sizeof(struct try));C.str=(strucy try*)malloc(sizeof(struct try));D.str=(struc try)malloc(sizeof(struct try));

考题 WIN32 平台下,sizeof(short) = ____,sizeof(int) = ____,sizeof(long) = ____。

考题 char str[ ]= "Hello";char *p=str;int n=10;sizeof(str)=( )sizeof(p)=( )sizeof(n)=( )void func(char str[100]){ }sizeof(str)=( )

考题 有以下定义和语句,则sizeof(a) 的值是【 】,而sizeof(a,share)的值是【 】struct date{ int day;int mouth;int year;union{int share1;float share2;}share;}a;

考题 有以下定义和语句,则sizeof(a.share)的值是( )。struct date{ unsigned int day;unsigned int mouth;unsigned int year;union{int share1;float share2;}share;}a;

考题 下列x的值是int x;x= sizeof 2.25*4;

考题 以下为 Windows NT 下的 32位 C++程序,请计算 sizeof的值char str[] = “Hello” ; char *p = str ;int n = 10;请计算 sizeof (str )= sizeof ( p ) = sizeof ( n ) = void Func (char str[100]){请计算 sizeof( str ) = }void *p = malloc( 100 );请计算 sizeof ( p ) =

考题 经下列语句定义后,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

考题 有以下程序#includestdio.hmain( ){int s,t,A=10 ouble B=6;s=sizeof(A);t=sizeof(B);printf(”%d,%d\n”,s,t);}在VC6平台上编译运行,程序运行后的输出结果是( )。A.2,4B.1,4C.4,8D.10,6

考题 若有下面的说明和定义: struct test { int m1; char m2; float m3; union uu {char ul[5]; int u2[2];} ua; }myaa;则sizeof(struct test)的值是( )。A.12B.16C.14D.9

考题 变量W_data定义如下:union data_node{float ff'int n;char ch;}W_data;则变量W_data所占的内存存储空间可表示为______。A.sizeof(int) B.sizeof(char) C.sizeof(float) D.sizeof(int)+sizeof(char)+sizeof(float)

考题 以下程序段的输出结果是()。      struct node         {int a;  float b;  char c[10];}  printf(“%d”,sizeof(struet node)) ;

考题 若指针p已正确定义,要使p指向两个连续的整型动态存储单元,不正确的语句是()。A、p=2*(int*)malloc(sizeof(int));B、p=(int*)malloc(2*sizeof(int));C、p=(int*)malloc(2*2);D、p=(int*)calloc(2,sizeof(int))。

考题 填空题以下程序段的输出结果是()。      union node      {int a;      float b;      Char C[10];};    printf(”%d”,sizeof(union node));

考题 单选题有以下程序 #include main() {  ints,t,A=10;  doubleB=6;  s=sizeof(A);  t=sizeof(B);  printf(%d,%d,s,t); } 在VC++2010平台上编译运行,程序运行后的输出结果是(  )。A 4,8B 4,4C 2,4D 10,6

考题 单选题有以下程序#include main(){ char *p1 = 0;  int *p2 = 0; float *p3 = 0; printf(%d,%d,%d, sizeof(p1), sizeof(p2), sizeof(p3));}程序运行后的输出结果是(  )。A 4,4,4B 1,4,8C 0,0,0D 1,2,4

考题 单选题有以下程序 #include main() {  ints,t,A=10;  doubleB=6;  s=sizeof(A);  t=sizeof(B);  printf(%d,%d,s,t); } 在VC++2010平台上编译运行,程序运行后的输出结果是(  )。A 3,4B 4,4C 4,8D 10,6