以下“C”程序的输出是什么?(假设多字节数据的little–endian表示,其中最低有效字节(LSB)存储在最低内存地址。)
null
#include <stdio.h> #include <stdlib.h> / * Assume short int occupies two bytes of storage */ int main ( ) { union saving { short int one; char two[2]; }; union saving m; m.two [0] = 5; m.two [1] = 2; printf(’’%d, %d, %d”, m.two [0], m.two [1], m.one); }/ * end of main * /
(A) 5, 2, 1282 (B) 5, 2, 52 (C) 5, 2, 25 (D) 5, 2, 517 答复: (D) 说明: 这个问题的小测验
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END