O'Reilly logo

Objective-C Programming: The Big Nerd Ranch Guide by Mikey Ward, Aaron Hillegass

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7 Numbers

You have used numbers to measure and display temperature, weight, and how long to cook a turkey. Now let’s take a closer look at how numbers work in C programming. On a computer, numbers come in two flavors: integers and floating-point numbers. You have already used both.

Integers

An integer is a number without a decimal point – a whole number. Integers are good for tasks like counting. Some tasks, like counting every person on the planet, require really large numbers. Other tasks, like counting the number of children in a classroom, require numbers that are not as large.

To address these different tasks, integer variables come in different sizes. An integer variable has a certain number of bits in which it can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required