© Slobodan Dmitrović 2021
S. DmitrovićModern C for Absolute Beginnershttps://doi.org/10.1007/978-1-4842-6643-4_3

3. Types and Declarations

Slobodan Dmitrović1  
(1)
Belgrade, Serbia
 

In this section, 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’s name. When we declare a variable, 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 and end the entire statement with a semicolon ...

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.