Re: short int always 16 bits or not?

Discussion in 'C Programming' started by Keith Thompson, Apr 20, 2013.

  1. 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"
     
    Keith Thompson, Apr 20, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Barry Schwarz

    Re: short int always 16 bits or not?

    Barry Schwarz, Apr 20, 2013, in forum: C Programming
    Replies:
    2
    Views:
    206
    glen herrmannsfeldt
    Apr 22, 2013
  2. Eric Sosman

    Re: short int always 16 bits or not?

    Eric Sosman, Apr 20, 2013, in forum: C Programming
    Replies:
    0
    Views:
    203
    Eric Sosman
    Apr 20, 2013
  3. Shriramana Sharma

    Re: short int always 16 bits or not?

    Shriramana Sharma, Apr 20, 2013, in forum: C Programming
    Replies:
    10
    Views:
    318
    Ken Brody
    Apr 25, 2013
  4. James Kuyper

    Re: short int always 16 bits or not?

    James Kuyper, Apr 20, 2013, in forum: C Programming
    Replies:
    2
    Views:
    186
    James Kuyper
    Apr 22, 2013
  5. Les Cargill

    Re: short int always 16 bits or not?

    Les Cargill, Apr 20, 2013, in forum: C Programming
    Replies:
    0
    Views:
    188
    Les Cargill
    Apr 20, 2013
Loading...

Share This Page