C Primer Plus 第三章编程练习笔记
前言最近假期重拾了C Primer Plus,做了做第三章的编程练习题。因为才是第三章,所以难度不是很大,不过有一些小地方还是值得注意的。因为中文版翻译的水平实在难以恭维,而且英文版确实上手不难,所以就用英文版的题目了。
题目1
Find out what your system does with integer overflow, floating-point overflow, andfloating-point underflow by using the experimental approach; that is, write programs having these problems. (You can check the discussion in Chapter 4 of limits.h and float.h to get guidance on the largest and smallest values.)
思路这题比较简单,在于考察底层的知识。可以参考注释,找找自己电脑的 limits.h 头文件,找到相关的定义。像我这台64位的电脑,int 和 lo ...
