假定编译器规定int和short类型长度分别为32位和16位,执行下列C语言语句: unsigned short a = 65534. unsigned int b ; b =a; 得到b的机器数为(41)。A.00007FFEHB.OOOOFFFEiHC.FFFF7FFEHD.FFFFFFFEH
假定编译器规定int和short类型长度分别为32位和16位,执行下列C语言语句: unsigned short a = 65534. unsigned int b ; b =a; 得到b的机器数为(41)。
A.00007FFEH
B.OOOOFFFEiH
C.FFFF7FFEH
D.FFFFFFFEH
相关考题:
请编写一个函数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){//* * * * * *}
( 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
Java语言中数值数据的类型能自动转换,按照从左到右的转换次序为()。A.byte→int→short→long→float→doubleB.byte→short→int→long→float→doubleC.byte→short→int→float→long→doubleD.short→byte→int→long→float→double
自动类型转换是按优先关系从低级数据转换成高级数据,规定的优先次序是( )。A.byte, short, char→int→long→float→doubleB.float→int→long→byte, short, char→doubleC.int→long→float→double→byte, short, charD.double→int→float→long→byte, short, char
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);}
自动类型转换规定的优先次序是( )。A.short,byte,char→long→int→float→doubleB.short,byte,char→int→long―float→doubleC.byte,short,char→long→int→float→doubleD.byte,short,char→int→long→float→double
下列各组类型声明符中,含义相同的一组是( )。A.unsigned longint和longB.signed short和shortC.unsigned short和shortD.shortint和int
基本数据类型精度从低到高排列正确的是()A.byte short int float doubleB.byte short int double floatC. short byte int float doubleD. short byte int double float
以下代码中变量result的可能类型有哪些?byte b = 11;short s = 13;result = b * ++s; A.byte, short, int, long, float, doubleB.boolean, byte, short, char, int, long, float, doubleC.byte, short, char, int, long, float, doubleD.byte, short, charE.int, long, float, double
Java中整型包括()。A、int,byte,charB、int,short,long,byte,charC、int,short,long,charD、int,short,long,byte
单选题下列各组类型声明符中,含义相同的一组是( )。Aunsigned long int和longBsigned short int和shortCunsigned short和shortDshort int和int
填空题short int类型的长度为()。