操作系统参考答案.docxVIP

  • 1
  • 0
  • 约1.55千字
  • 约 3页
  • 2023-04-12 发布于上海
  • 举报
参考答案 Const 和 #define 的区别? Const 常量有数据类型,而宏常量没有数据类型 #include filename.h 和 #include “filename.h” 有什么区别? 对于#include filename.h ,编译器从标准库路径开始搜索 filename.h 对于#include “filename.h” ,编译器从用户的工作路径开始搜索 filename.h 编写一个宏,输入 2 个参数,输出结果为两个参数的积考察定义宏时,是否添加 括号,分号等。 #define TIMES(a,b) ((a)*(b)) char str[] = “Hello” 计算 sizeof (str)的数值6 写出 float x 与“零值”比较的 if 语句 const float EPSINON = 0.00001; if ((x = - EPSINON) (x = EPSINON) 写出 char *p 与“零值”比较的 if 语句 if (p == NULL) 写一个函数,判定运算环境(16 位以上字长)是 little-endian 还是 big-endian /* 函数返回 0:little endian,非零:big endian */ int is_little_endian(void) { int v = 1; if(*((char *)v)

文档评论(0)

1亿VIP精品文档

相关文档