Data types

S

Samuel Thomas

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
 
D

Derk Gwen

(e-mail address 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)
 
K

Keith Thompson

Martien Verbruggen said:
On 24 Jul 2003 22:16:33 -0700,


and long double for C99.

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Types 58
Types in C 117
C99 integer types 24
Collect Excel Data from Website 5
dff data types in c++ 4
Creating array of data types 20
c++ data types in python script 1
data type choice 7

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top