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 a "plain" short int is signed or unsigned is
    implementation-defined.
 
      Notes:    In Turbo 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 and 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;

Seealso:



This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster