Chapter 2. Declarations and Initialization (DCL)

Chapter Contents

Image

Risk Assessment Summary

Image

Image DCL30-C. Declare objects with appropriate storage durations

Every object has a storage duration that determines its lifetime: static, thread, automatic, or allocated.

According to the C Standard, 6.2.4, paragraph 2 [ISO/IEC 9899:2011]:

The lifetime of an object is the portion of program execution during which storage is guaranteed to be reserved for it. An ...

Get The CERT ® C Coding Standard: 98 Rules for Developing Safe, Reliable, and Secure Systems, Second Edition 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.