Data types

Discussion in 'C Programming' started by Samuel Thomas, Jul 25, 2003.

  1. Hello everybody,

    Could somebody help me with the basic data types we have. I am always
    getting confused. Can I write the datatypes in ascending order like
    this?

    char --> int --> short --> long

    float --> double

    Are there any other relations? Could somebody tell me more about the
    size of these data types?

    Sorry for asking such a stupid qn

    Thanks for all the help
    :) Sam
    Samuel Thomas, Jul 25, 2003
    #1
    1. Advertising

  2. Samuel Thomas

    Derk Gwen Guest

    (Samuel Thomas) wrote:
    # Hello everybody,
    #
    # Could somebody help me with the basic data types we have. I am always
    # getting confused. Can I write the datatypes in ascending order like
    # this?
    #
    # char --> int --> short --> long
    #
    # float --> double
    #
    # Are there any other relations? Could somebody tell me more about the
    # size of these data types?

    In 1989 there were three possible semilatticess

    long double: double, float, long unsigned, long int, unsigned, int
    double: float, long unsigned, long int, unsigned, int
    float: long unsigned, long int, unsigned, int
    long unsigned: long int, unsigned, int

    long int: unsigned, int
    unsigned: int
    OR
    unsigned: int, long int
    long int: unsigned, int
    OR
    long int: int
    unsigned: int

    int: (short int, short unsigned, char, signed char, unsigned char)

    --
    Derk Gwen http://derkgwen.250free.com/html/index.html
    Where do you get those wonderful toys?
    Derk Gwen, Jul 25, 2003
    #2
    1. Advertising

  3. Martien Verbruggen <> writes:
    > On 24 Jul 2003 22:16:33 -0700,
    > Samuel Thomas <> wrote:

    [...]
    > > float --> double

    >
    > and long double for C99.


    long double is defined in C90. (In many implementations, double and
    long double have the same representation.)

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
    Schroedinger does Shakespeare: "To be *and* not to be"
    Keith Thompson, Jul 25, 2003
    #3
    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. Sathyaish
    Replies:
    2
    Views:
    583
    Sathyaish
    May 22, 2005
  2. Soren Kuula
    Replies:
    2
    Views:
    546
    Henry S. Thompson
    Dec 1, 2005
  3. ramu
    Replies:
    2
    Views:
    316
    rlblaster
    Feb 20, 2006
  4. Gary Roach
    Replies:
    0
    Views:
    105
    Gary Roach
    Sep 1, 2013
  5. Fábio Santos
    Replies:
    0
    Views:
    116
    Fábio Santos
    Sep 4, 2013
Loading...

Share This Page