Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>short short integer data type</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 short                   Short Integer Data Type

    The keyword short may be applied to the int type.  The short int type
    declares an object to be of "plain" integral type.  The size (and
    representation) of a short int object is implementation-defined; a
    short int, however, is guaranteed to be the same or less in size than
    an int.  Whether or not a "plain" short int is signed or unsigned is
    implementation-defined.

      Notes:    In MS-C, the size of a short int object is two bytes and
                "plain" short ints are signed.  That is, short int is
                equivalent to signed short int and its range of values is
                -32768 to 32767, inclusive.

                One of the keywords signed or unsigned may be used as a
                prefix to short int, to identify the short integer as
                being signed or unsigned, respectively.

                If short is used without the keyword int, the int is
                assumed.

                When a short int is used as a function argument, it is
                first promoted to an int.

   -------------------------------- Example ---------------------------------

           short int value = 6;
           short action_code = 'A';
           short int bit_pattern = '\xAB';
           short int counters[6];
           short *pointer_to_short_int;
           short int function();

           value = (short int) 123.45;
           value = (short) 123.45;




See Also: int long signed unsigned

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson