清华大学出版社 TSINGHUA UNIVERSITY PRESS (2)整型变量的分类: 符号基本整型( signed)int 2/4字节 共有符号怎整型 ( signed)shot(int)2字节 有符号长整型 signed)long(int)4字节 种)无符号基本整型 unsigned int 24字节 无符号短整型 unsigned short(int)2字节 无符号长整型 unsigned long(int)4字节 注:考虑各种类型整数的取值范围? 语言程序设计(第三版)‖http:/iCcf.tsinghua.edu.cn11
C语言程序设计(第三版) http://ccf.tsinghua.edu.cn 11 (2)整型变量的分类: 共 六 种 有符号基本整型 有符号短整型 有符号长整型 无符号基本整型 无符号短整型 无符号长整型 (signed)int (signed)short (int ) (signed) long (int) unsigned int unsigned short (int) unsigned long (int) 2/4字节 2字节 4字节 2/4字节 2字节 4字节 注:考虑各种类型整数的取值范围?
清华大学出版社 TSINGHUA UNIVERSITY PRESS (4)数据溢出问题 假设int型,用TC编译系统,输出32767+1=? 0111111111 1000000000000000 语言程序设计(第三版)‖http:/iCcf.tsinghua.edu.cn12
C语言程序设计(第三版) http://ccf.tsinghua.edu.cn 12 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (4)数据溢出问题 假设int型,用TC编译系统,输出32767+1=? 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0