3ARITHMETIC TYPES

Image

In this chapter, you’ll learn about the two kinds of arithmetic types: integers and floating-point types. Most operators in C operate on arithmetic types. Because C is a system-level language, performing arithmetic operations correctly can be difficult—resulting in frequent defects. This is partially because arithmetic operations in digital systems with limited range and precision do not always produce the same result as they would in ordinary mathematics. Being able to perform basic arithmetic correctly in C is an essential foundation to becoming a professional C programmer.

We’ll dive deep into how arithmetic works in the ...

Get Effective C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.