© Igor Zhirkov 2017

Igor Zhirkov, Low-Level Programming, 10.1007/978-1-4842-2403-8_9

9. Type System

Igor Zhirkov

(1)Saint Petersburg, Russia

The notion of type is one of the key ones. A type is essentially a tag assigned to a data entity. Every data transformation is defined for specific data types, which ensures their correctness (you would not want to add the amount of active Reddit users to the average temperature at noon in Sahara, because it makes no sense).

This chapter will study the C type system in depth.

9.1 Basic Type System of C

All types in C fall into one of these categories:

  • Predefined numeric types (int, char, float, etc.).

  • Arrays, multiple elements of the same type occupying consequent memory cells.

  • Pointers, which are essentially the ...

Get Low-Level Programming: C, Assembly, and Program Execution on Intel® 64 Architecture 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.