Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Data types

Reply
Thread Tools

Data types

 
 
Samuel Thomas
Guest
Posts: n/a
 
      07-25-2003
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
 
Reply With Quote
 
 
 
 
Derk Gwen
Guest
Posts: n/a
 
      07-25-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (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?
 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      07-25-2003
Martien Verbruggen <(E-Mail Removed)> writes:
> On 24 Jul 2003 22:16:33 -0700,
> Samuel Thomas <(E-Mail Removed)> 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) (E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
equivalent c data types for vc++ data types ramu C Programming 2 02-20-2006 09:33 AM
Can XSD simple types be derived from complex types? Soren Kuula XML 2 12-01-2005 07:51 PM
Where are ref types that are members of value types stored? Sathyaish ASP .Net 2 05-22-2005 07:32 PM
Boost + Python C/API: Mixing python return types with boost return types Steve Knight Python 2 10-10-2003 10:11 AM
STD types vs C++ intrinsic types Jeremy Cowles C++ 5 08-19-2003 05:33 PM



Advertisments