O'Reilly logo

iOS App Development Portable Genius by Richard Wentk

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

C Data Types

Table A.1 shows the fundamental C language data types. You can use them in Objective-C code, but you must convert them into objects if you want to use them inside Objective-C data collections.

Note that the double type is much slower for floating-point calculations, but far more accurate than the float type.

caution_exclamation_2c.eps

The names of C data types are standardized, but the sizes are implementation dependent. The sizes in the table are correct for iOS. Other computer systems use different sizes. This doesn’t matter if your code runs only on iOS devices. It can matter if you use code written for other computers, or share your code with developers who work on other computers. Note also you may come across further types such as short, long double, long long, and so on. The table includes the types you’re most likely to use in your code. The other types are much less common, and only used for specialized tasks.

9781118462133-tbbapp01

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