的一个数据类型的范围定义 [英] Definition of range of a data type

查看:82
本文介绍了的一个数据类型的范围定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是数据类型的范围的意思,如整型?

What is meant by "range" of a data type such as integer?

推荐答案

范围意味着可存储在给定类型的变量内的最大值和最小值。例如,如果你已经无符号的字符,如果我们假设数据类型的大小为8位,那么你可以存储值从0 - 2 ^ 8-1即0-255里面

Range means the maximum and minimum value that can be stored inside the variable of a given type. For example if you have unsigned char and if we assume that the size of the datatype is 8 bits then you can store values ranging from 0 - 2^8-1 i.e. 0-255 inside it.

这篇关于的一个数据类型的范围定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆