© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
M. KalinModern C Up and Runninghttps://doi.org/10.1007/978-1-4842-8676-0_4

4. Storage Classes

Martin Kalin1  
(1)
Chicago, IL, USA
 

4.1 Overview

In C, a storage class determines where functions and variables are stored, how long variables persist, and where functions and variables can be made visible. For functions, the key issue is visibility (scope) because the lifetime of a function is the lifetime of the program that contains the function. For variables, both lifetime and scope are of interest to the programmer.

Storage classes also shed further light on the distinction between declarations and definitions in C. In large programs, with the constituent functions ...

Get Modern C Up and Running: A Programmer's Guide to Finding Fluency and Bypassing the Quirks 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.