问题 单项选择题

若有以下说明和定义 union dt {int a;char b;double c;}data; 以下叙述中错误的是【 】。

A.data的每个成员起始地址都相同

B.变量data所占的内存字节数与成员c所占字节数相等

C.程序段data.a=5;printf("%f\n",data.c);输出结果为5.000000

D.D

答案

参考答案:C

解析:union是表示共用体的关键字,成员a,b,c共占用同一个内存空间, data的每个成员起始地址都相同;共用体变量所占的内存长度等于最长的成员的长度,故变量data所占的内存字节数与成员c所占字节数相等:执行"data.a=5;printf("%f\n",data.c);"printf函数只是将内存中的数据以不同的类型输出,而不能将内存中的整型数据自动转换为等值的浮点数故C是错误的。

单项选择题
填空题

President Bush arrived in Washington and forged ahead with an ambitious agenda- (1) tax cuts, vast changes in federal social programs, expansions of executive power and (2) broad remaking of energy and education policies.
Claiming a mandate by simply declaring (3) existence, his early successes dazzled his critics. With guru Karl Rove directing the (4) , Bush won a stunning series of political victories.
He muscled his agenda through (5) friendly Congress, and gained seats for his party in the 2002 midterm elections. (6) biggest triumph came in 2004, when he won a second term despite a (7) unpopular war.
The "permanent" Republican majority he and Rove envisioned even seemed attainable (8) Bush plunged himself into his most ambitious legislative effort yet: a partial privatization (9) Social Security.
But the president who boasted about "political capital" in the heady (10) after his re-election now faces the worst of political fates as he enters (11) final year in office: borderline irrelevance.
The president’s second term has (12) defined by legislative paralysis, marked by record-low approval ratings, presidential candidates who are (13) from his shadow, and a lingering war that’s sapping his remaining reservoirs of (14) .
As he enters his final year in office with the war continuing, Republican (15) for president bolting from his shadow, and his party back in the minority (16) Congress, he is politically weakened, an early entry into lame-duck status.
And the (17) Washington atmosphere he hoped to cure is just as nasty as it was (18) he came to office seven years ago.
"lie’s left our political institutions much (19) troubled than they were before," said Thomas E. Mann, a senior fellow at (20) Brookings Institution, a Washington-based think tank. "He didn’t create the ideological polarization, but he magnified it. \