Re: short int always 16 bits or not?

Shriramana Sharma <> writes:
> Hello. I am reading the C99 standard as available from:
> http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf
>
> I note that it specifies (on p 34) macros defining the minimum and
> maximum values of a short int corresponding to a size of 16
> bits. However it doesn't explicitly say that short int-s should be of
> 16 bits size. So can I trust short int-s to be 16 bits size or not?

I've actually worked on a system with 32-bit shorts, and another with
64-bit shorts (both were Cray supercomputers).

--
Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!