Skip to Content
Practical C Programming, 3rd Edition
book

Practical C Programming, 3rd Edition

by Steve Oualline
August 1997
Beginner
454 pages
9h 32m
English
O'Reilly Media, Inc.
Content preview from Practical C Programming, 3rd Edition

Appendix B. Ranges and Parameter Passing Conversions

Ranges

Table B-1 and Table B-2 list the ranges of various variable types.

Table B-1. 32-Bit UNIX Machine

Name

Bits

Low value

High value

Accuracy

int

32

-2147483648

2147483647

 

short int

16

-32768

32767

 

long int

32

-2147483648

2147483647

 

unsigned int

32

0

4294967295

 

unsigned short int

16

0

65535

 

unsigned long int

32

0

4294967295

 

char

8

System Dependent

  

unsigned char

8

0

255

 

float

32

-3.4E+38

3.4E+38

6 digits

double

64

-1.7E+308

1.7E+308

15 digits

long double

64

-1.7E+308

1.7E+308

15 digits

Table B-2. Turbo C++, Borland C++, and Most Other 16-bit Systems

Name

Bits

Low value

High value

Accuracy

int

16

-32768

32767

 

short int

16

-32768

32767

 

long int

32

-2147483648

2147483647

 

unsigned int

16

0

65535

 

unsigned short int

16

0

65535

 

unsigned long int

32

0

4294967295

 

char

8

-128

127

 

unsigned char

8

0

255

 

float

32

-3.4E+38

3.4E+38

6 digits

double

64

-1.7E+308

1.7E+308

15 digits

long double

80

-3.4E+4932

3.4E+4932

17 digits

Automatic Type Conversions to Use When Passing Parameters

In order to eliminate some of the problems that may occur when passing parameters to a function, C performs the following automatic conversions to function arguments as shown in Table B-3.

Table B-3. Automatic Conversions

Type

Converted to

char

int

short int

int

int

int

long int

long int

float

double

double

double

long double

long double

array

pointer

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Practical C Programming

Practical C Programming

B. M. Harwani

Publisher Resources

ISBN: 1565923065Errata Page