关键词int的定义是什么 [英] what is the definition on the key word int

查看:164
本文介绍了关键词int的定义是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



关键词int的定义是什么。

如何内部工作......





问候,

Shefeek

解决方案

整数(int)类型变量是一个只能保存整数的变量(例如。-2,-1,0,1,2)。一个int是2或4个字节。 />
从这里查看详细信息..

http:// www .learncpp.com / cpp-tutorial / 24-integers / [ ^ ]


例如:16位OS int为2字节,32位OS int为4字节。


< blockquote> int被定义为特定编译器决定合理的任何大小的有符号值。如果我没记错的话,它必须至少是16位。



标准仅定义:



sizeof(char)< = sizeof(short)< = sizeof(int)< = sizeof(long)(等等其他变体'依赖于支持,例如__int64,long long)



(sizeof(t)是提供的t类型的大小(以字节为单位)


Hi all,

what is the definition on the key word int.
How the internal working ....


Regards,
Shefeek

解决方案

An integer(int) type variable is a variable that can only hold whole numbers (eg. -2, -1, 0, 1, 2).An int is either 2 or 4 bytes .
See details from here..
http://www.learncpp.com/cpp-tutorial/24-integers/[^]


for example: in 16 bits OS int is 2bytes, in 32 bits OS int is 4 bytes.


An int is defined as a signed value of whatever size a particular compiler decides is reasonable. If I remember correctly, it must be at least 16-bit.

The standard defines only that:

sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long) (etc. other variant''s depend on support, e.g. __int64, long long)

(sizeof(t) is the size (in bytes) of the type t supplied)


这篇关于关键词int的定义是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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