© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
S. DmitrovićModern C for Absolute Beginnershttps://doi.org/10.1007/979-8-8688-0224-9_3

3. Types and Declarations

Slobodan Dmitrović1  
(1)
Belgrade, Serbia
 

In this chapter, we will learn about the built-in types in C and variable declarations.

3.1 Declarations

A declaration declares a (variable) name. When we declare a variable, we specify its type and variable name, and the compiler reserves memory for our variable. This occupied space is called an object or data object in memory. These data objects are accessed by names we call variables. We need to declare a variable before we can use it. To declare a variable, we put the type_name before the variable_name ...

Get Modern C for Absolute Beginners: A Friendly Introduction to the C Programming Language 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.