![](https://lstatic.shangxueba.com/jiandati/pc/images/pc_jdt_tittleico.png)
![](https://lstatic.shangxueba.com/jiandati/pc/images/logo2.png)
![评价下面的代码片断: unsigned int zero = 0; unsigned int compzero = 0xFFFF; /*1's compl](https://img2.soutiyun.com/shangxueba/askcard/2023-06/18/1088/20230618190546191.jpg)
评价下面的代码片断: unsigned int zero = 0; unsigned int compzero = 0xFFFF; /*1's compl
评价下面的代码片断:
unsigned int zero = 0;
unsigned int compzero = 0xFFFF;
/*1's complement of zero */
对于一个 int型不是16位的处理器为说,上面的代码是不正确的。应编写如
下:
unsigned int compzero = ~0;
![](https://lstatic.shangxueba.com/jiandati/pc/images/jdt_panel_vip.png)
评价下面的代码片断:
unsigned int zero = 0;
unsigned int compzero = 0xFFFF;
/*1's complement of zero */
对于一个 int型不是16位的处理器为说,上面的代码是不正确的。应编写如
下:
unsigned int compzero = ~0;
评价下面的代码片断:
unsigned int zero = 0;
unsigned int compzero = 0xFFFF;
/*1's complement of zero */
12 . 下面的代码输出是什么,为什么?
void foo(void)
{
unsigned int a = 6;
int b = -20;
(a+b > 6) puts("> 6") : puts("<= 6");
}
程序改错
class mml
{
private:
static unsigned int x;
public:
mml(){ x++; }
mml(static unsigned int &) {x++;}
~mml{x--;}
pulic:
virtual mon() {} = 0;
static unsigned int mmc(){return x;}
......
};
class nnl:public mml
{
private:
static unsigned int y;
public:
nnl(){ x++; }
nnl(static unsigned int &) {x++;}
~nnl{x--;}
public:
virtual mon() {};
static unsigned int nnc(){return y;}
......
};
代码片断:
mml* pp = new nnl;
..........
delete pp;
给出下面的代码片断:
1)public void create(){
2)Vector myVect;
3)myVect=new Vector();
4)}
下面陈述为true(真)的是______。
A.第二行的声明不会为变量myVect分配内存空间
B.第二行的声明分配一个到Vector对象的引用的内存空间
C.第二行语句创建一个Vector类对象
D.第三行语句创建一个Vector类对象
E.第三行语句为一个Vector类对象分配内存空间
A.1
B.2
C.5
D.8
【多选题】分析下面的HTML代码片断,则选项中的说法错误的是() <table border="10" bordercolor="yellow" cellspacing="0" cellpadding="5"> <tr bgcolor="red"> <td colspan="2">书籍</td colspan="2"></tr bgcolor="red"></table border="10" bordercolor="yellow" cellspacing="0" cellpadding="5">
<td colspan="3">音像</td colspan="3">
</colspan>
图书 | 杂志 | 磁带 | CD | DVD |
A、"书籍"和“音像”所在行的背景色为red
B、表格共5列,"书籍"跨2列,“音像”跨3列
C、表格中文字与边框距离为0,表格内宽度为5
D、表格的背景颜色为yellow
A.表格共5列,书籍跨2列,音像跨3列
B.表格的背景颜色为yellow
C.书籍和音像所在行的背景色为red
D.表格中单元格间距为0,单元格填充为5
A.表格共5列,书籍跨2列,音像跨3列
B.表格的背景颜色为yellow
C.书籍和音像所在行的背景色为red
D.表格中单元格间距为0,单元格填充为5
A.其他三个选项都不对
B.unsigned short,short
C.int,short
D.unsigned int, int
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!