int和char的大小 [英] size of int and char
问题描述
64位计算机上int的大小是多少?
char可以与signed char的大小不同吗?
What is the size of int on 64-bit computers ?
Can char have minimal size different from signed char ?
推荐答案
ra****@op.pl 写于07/02/07 13:13, :
ra****@op.pl wrote On 07/02/07 13:13,:
64位计算机上int的大小是多少?
What is the size of int on 64-bit computers ?
sizeof(int)。所有可以确定的是
这个值至少是ceil(16 / CHAR_BIT);可能
更大。
sizeof(int). All that can be said with certainty is
that this value is at least ceil(16/CHAR_BIT); it might
be greater.
char是否具有与signed char不同的最小大小?
Can char have minimal size different from signed char ?
No.所有sizeof(char),sizeof(signed char)和
sizeof(unsigned char)等于1。
-
Er ******** *@sun.com
ra **** @ op。 pl 写道:
64位计算机上int的大小是多少?
What is the size of int on 64-bit computers ?
无论实现使用什么,只要它至少包含
范围,标准要求为整数(-32767到+32767) 。唯一的
答案是sizeof(int)或sizeof(int)* CHAR_BIT,具体取决于你的
问题。
Whatever the implementation uses, as long as it includes at least the
range the standard requires for ints (-32767 through +32767). The only
answers are sizeof(int) or sizeof(int)*CHAR_BIT, depending on what your
question actually is.
char可以与signed char有不同的最小大小吗?
Can char have minimal size different from signed char ?
sizeof(char)= sizeof(unsigned char)= sizeof(signed char)= 1
的定义。
sizeof(char) = sizeof(unsigned char) = sizeof(signed char) = 1
by definition.
< ra **** @ op.plha scritto nel messaggio新闻:11 *************** ******@n60g2000hse.googlegro ups.com ...
<ra****@op.plha scritto nel messaggio news:11*********************@n60g2000hse.googlegro ups.com...
64位计算机上int的大小是多少?
What is the size of int on 64-bit computers ?
sizeof(int)
sizeof(int)
char是否具有与signed char不同的最小大小?
Can char have minimal size different from signed char ?
编号。根据定义,它们的大小都是1。
No. They both have size 1, by definition.
这篇关于int和char的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!