0% found this document useful (0 votes)
93 views

Sizes and Ranges of Basic Data Types in C For A 16 Bit Computer

This document summarizes the sizes and ranges of basic data types for a 16-bit computer in C. It shows that the size of basic data types ranges from 1 to 10 bytes, with char, unsigned char, and signed char being 1 byte, short int and int being 2 bytes, long int being 4 bytes, and long double being 10 bytes. It also lists the range of values each data type can hold as well as any default type associations.

Uploaded by

Priyanka Dobhal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views

Sizes and Ranges of Basic Data Types in C For A 16 Bit Computer

This document summarizes the sizes and ranges of basic data types for a 16-bit computer in C. It shows that the size of basic data types ranges from 1 to 10 bytes, with char, unsigned char, and signed char being 1 byte, short int and int being 2 bytes, long int being 4 bytes, and long double being 10 bytes. It also lists the range of values each data type can hold as well as any default type associations.

Uploaded by

Priyanka Dobhal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Sizes and Ranges of basic data types in C for a 16 bit computer

Data type
char
unsigned char
signed char
int
unsigned int
signed int
short int
unsigned short int
signed short int
long int
unsigned long int
signed long int
float
double
long double

Size(in
bytes)
1 byte
1 byte
1 byte
2 bytes
2 bytes
2 bytes
2 bytes
2 bytes
2 bytes
4 bytes
4 bytes
4 bytes
4 bytes
8 bytes
10 bytes

Range of value set

Default type

-127 to 128
0 to 255
-127 to 128
-32768 to 32767
0 to 65535
-32768 to 32767
-32768 to 32767
0 to 65535
-32768 to 32767
-2147483648 to 2147483647
0 to 4294967295
-2147483648 to 2147483647
3.4x10 -38 to 3.4 x 10 +38
1.7x 10 -308 to 1.7 x 10 +308
3.4 x10 -4932 to 1.1 x10 4932

signed char
None
char
signed int
unsigned
int
short, signed short, signed short int
unsigned short
short, signed short, short int
long, signed long, signed long int
unsigned long
long int, signed long, long
-------

Reference: Computer fundamentals and programming in C Pradip Dey and Manas Ghosh, Oxford
Univ. press, 2006

You might also like