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

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

表达式“sizeof(unsigned short)”的值是()。

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

参考答案

更多 “表达式“sizeof(unsigned short)”的值是()。A、2B、4C、3D、8” 相关考题
考题 设有定义: char p[]={'1', '2', '3'},*q=p; , 以下不能计算出一个 char 型数据所占字节数的表达式是A ) sizeof(p)B)sizeof(char)C) sizeof(*q)D)sizeof(p[0])

考题 switch语句中的表达式的值只能是int、byte、short和______型的值。

考题 请编写一个函数unsigned short fun(unsigned short s)。其中s是一个大于10的无符号整数,若s是一个n(n≥2)位整数,函数求出s的n位数之和作为函数的返回值。例如,s值为4315,则函数返回13。s值为13函数,则返回4。注意:部分源程序已存在文件PROC15.cpp中。请勿修改主函数和其他函数中的任何内容,仅在函数fun()的花括号中填写若干语句。文件PROC15.cpp的内容如下://PROC15.cppinclude<iostream>using namespace std;unsigned short fun(unsigned short s);int main(){unsigned short a;cout<<"Enter a unsigned short integer number:";cin>>a;if(a<10)cout<<"Data error!";elsecout<<"The result: "<<fun(a)<<end1;return 0;}unsigned short fun(unsigned short s){//* * * * * *}

考题 若a, b 为short类型变量,并且已分别赋值为3和12,则表达式!(--a!=b++)的值是______。

考题 ( 18 )下列各组类型声明符中,含义相同的一组是A ) unsigned long int 和 longB ) signed short int 和 shortC ) unsigned short 和 shortD ) short int 和 int

考题 下列各组类型声明符中,含义相同的一组是A.unsigned long int和longB.signed short int和shortC.unsigned short和shortD.short int和int

考题 以下选项中不属于c语言的类型的是( )。A.unsigned long intB.long shortC.unsigned intD.signed short int

考题 以下程序的输出结果是【 】。main(){ unsigned short a=65536; int b;printfC%d\n",b=a);}

考题 以下选项中不属于C语言的类型的是A.signed short intB.unsigned long intC.unslgned intD.long short

考题 阅读以下说明和C语言代码,回答问题1至问题5,将解答填入答题纸的对应栏内。[说明]在实模式存储管理方案下,嵌入式系统的内存地址空间的布局一般可以分为五个段:代码段(text)、数据段(data)、bss段(bss)、堆(heap)和栈(stack)。图16-4为一段例程。1: include2: unsigned char gvCh;3: unsigned short gvShort;4: unsigned int gvInt = 0x12345678;5: unsigned long gvLong = 0x87654321;6: void main(void)7: {8: unsigned char array[lO],*p;9: p = malloc(lO*sizeof(char));10: while (1);代码段、数据段和bss段的大小是在什么时候确定的?

考题 以下选项中不属于C语言的类型的是 ______。A.signed short intB.unsigned long intC.unsigned intD.long short

考题 阅读以下程序段,在实模式存储管理方案中,gvCh存放在(36)中;main函数编译后的代码存入在(37)中;指针p存放在(38)中。#include<malloc. h>unsigned char gvCh;unsigned short gvShortunsigned int gvInt=0x12345678unsigned long gvLong=0x23456789;ovid main(void){ unsigned char array[10], *p;p=malloc(10 * sizeof(char))while(1)}A..text段B..data段C..bss段D.堆空间

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

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

考题 6 写出下列程序在X86 上的运行结果。struct mybitfields{unsigned short a : 4;unsigned short b : 5;unsigned short c : 7;}testvoid main(void){int i;test.a=2;test.b=3;test.c=0;i=*((short *)test);printf("%d\n",i);}

考题 若有定义inta[][3]={1,2,3,4,5,6,7,8,9};则表达式sizeof()/sizeof(a[0])的值为() A.3B.4C.5D.9

考题 以下叙述正确的是( )。A.表达式sizeof(FILE*)==sizeof(int*)的值为真B.文件指针的值是一个整数,它的值一定小于文件字节数C.文件指针的值是所指文件的当前读取位置D.使用fscanf函数可以向任意类型的文件中写入任意数量的字符

考题 下列各组类型声明符中,含义相同的一组是( )。A.unsigned longint和longB.signed short和shortC.unsigned short和shortD.shortint和int

考题 若有byte b=6;short s=20;则表达式b+s的值的类型是()。A.byteB.intC.shortD.char

考题 假定编译器规定int和short类型长度分别为32位和16位,执行下列C语言语句: unsigned short a = 65534. unsigned int b ; b =a; 得到b的机器数为(41)。A.00007FFEHB.OOOOFFFEiHC.FFFF7FFEHD.FFFFFFFEH

考题 表达式sizeof(“key”)的值是()A、1B、2C、3D、4

考题 若有定义inta[][3]={1,2,3,4,5,6,7,8,9};则表达式sizeof()/sizeof(a[0])的值为()A、3B、4C、5D、9

考题 下列哪种数据类型能表示的最大的值为65535?()A、charB、unsigned charC、shortD、unsigned short

考题 int id[sizeof(unsigned long)];这个对吗?为什么?

考题 下选项中不属于C语言的类型是()。A、signed short intB、unsigned long intC、unsigned intD、long short

考题 单选题若有定义inta[][3]={1,2,3,4,5,6,7,8,9};则表达式sizeof()/sizeof(a[0])的值为()A 3B 4C 5D 9

考题 问答题int id[sizeof(unsigned long)];这个对吗?为什么?