好词典

int

UK //ɪnt//US //ɪnt//

词源

作为数据类型缩写源自'integer'(拉丁语integer意为完整/未触碰);作为缩写源自'international'(跨国的)。

noun

❶ 计算机编程中表示整数(integer)的数据类型缩写,用于存储没有小数部分的数字,占用内存空间固定。

“In C++, you can declare an integer variable using 'int'.”

(在C++中,你可以用'int'声明一个整数变量。)

“The function returns an int value representing the result.”

(该函数返回一个表示结果的整数值。)

同义词:integer, whole number, numeric

常见短语

unsigned int — 编程术语,表示无符号整数类型,只能存储非负数值,比普通int范围更大。

“Use unsigned int when you know the value won't be negative.”

(当确定数值不会为负时使用无符号整型。)

int main() — C/C++程序的主函数标准写法,表示返回整型值的程序入口函数。

“Every C program starts execution from the int main() function.”

(每个C程序都从int main()函数开始执行。)