Page 1
GNU C Language Introduction and Reference Manual Richard Stallman and Trevis Rothwell plus Nelson Beebe on floating point
An introduction and reference to GNU C as supported by the GNU Compiler Collection (GCC), for GNU/Linux and other systems. Intended for readers with basic programming knowledge and for experienced C programmers, the manual introduces the language through examples and covers syntax, arithmetic, data types, pointers, structures, arrays, statements, functions, preprocessing, and compilation. It also addresses integer and floating-point behavior, GNU C extensions, and platform-dependent features. The preface describes its coverage as reflecting GNU C as of roughly 2017.
The first 5 pages, shown as text so search engines and readers can find this document.
GNU C Language Introduction and Reference Manual Richard Stallman and Trevis Rothwell plus Nelson Beebe on floating point
Copyright c© 2022 Richard Stallman and Free Software Foundation, Inc. (The work of Trevis Rothwell and Nelson Beebe has been assigned or licensed to the FSF.) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being “GNU General Public License,” with the Front-Cover Texts being “A GNU Manual,” and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License.” (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.”
i Short Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 The First Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 A Complete Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 Storage and Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 Beyond Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5 Lexical Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6 Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 7 Assignment Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8 Execution Control Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . 36 9 Binary Operator Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 10 Order of Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 11 Primitive Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 12 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 13 Type Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 14 Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 15 Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 16 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 17 Enumeration Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 18 Defining Typedef Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 19 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 20 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 21 Type Qualifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 22 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 23 Compatible Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 24 Type Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 25 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 26 Preprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 27 Integers in Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 28 Floating Point in Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 29 Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 30 Directing Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 A Type Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 B Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
ii C Digraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 D Attributes in Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 E Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 F GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . 224 Index of Symbols and Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 Concept Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
iii Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 The First Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Example: Recursive Fibonacci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.1 Function Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1.2 Function Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 The Stack, And Stack Overflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Example: Iterative Fibonacci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 A Complete Program . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1 Complete Program Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2 Complete Program Explanation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Complete Program, Line by Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4 Compiling the Example Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 Storage and Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 Beyond Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.1 An Example with Non-Integer Numbers. . . . . . . . . . . . . . . . . . . . . . . . 13 4.2 An Example with Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.3 Calling the Array Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.4 Variations for Array Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5 Lexical Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.1 Write Programs in English! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.2 Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.3 Whitespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.4 Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5.5 Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.6 Operators and Punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.7 Line Continuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 6 Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.1 Basic Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.2 Integer Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.3 Integer Overflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.3.1 Overflow with Unsigned Integers . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.3.2 Overflow with Signed Integers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 6.4 Mixed-Mode Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 6.5 Division and Remainder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Doxxly editorial guide
This guide helps you understand the scope of GNU C Language Introduction and Reference Manual before or alongside reading the original document. It is based on the catalogue record, credited creator, source, classification and topics shown on this page. It does not replace the original work and does not invent claims about passages that Doxxly cannot verify.
GNU C Language Introduction and Reference Manual is a 252-page documentcredited to Umar M. Zephyr. An introduction and reference to GNU C as supported by the GNU Compiler Collection (GCC), for GNU/Linux and other systems. Intended for readers with basic programming knowledge and for experienced C programmers, the manual introduces the language through examples and covers syntax, arithmetic, data types, pointers, structures, arrays, statements, functions, preprocessing, and compilation. It also addresses integer and floating-point behavior, GNU C extensions, and platform-dependent features. The preface describes its coverage as reflecting GNU C as of roughly 2017. It appears in the Technology & Security collection, which groups it with other material that readers may use for comparison and further study.
The item can be approached in several ways. A reader looking for a quick orientation can begin with the free five-page preview, inspect the page structure and use the metadata to judge relevance. Someone undertaking deeper research can work through the complete file, search its indexed text, record useful page references and compare its treatment of C programming, GNU C, GCC, Programming reference, Programming tutorial, Pointers, Data types, Floating-point arithmetic, Preprocessing with the related resources linked below.
Rather than reducing the work to a single claim, this page treats it as a source that should be read in context. The title, creator, publication source, licence and format all help explain what kind of evidence it may offer. Readers should distinguish the original author's statements from Doxxly's catalogue description, and should cite the original edition when using the material in academic, professional or published work.
The catalogue connects this document with C programming, GNU C, GCC, Programming reference, Programming tutorial, Pointers, Data types, Floating-point arithmetic, Preprocessing. These terms offer practical entry points rather than a substitute for close reading. Start by identifying the definitions, examples, arguments, tables or visual explanations attached to each topic. Then note where the creator draws connections, makes distinctions or moves from background material to a conclusion, recommendation, calculation or narrative development.
A useful reading method is to separate description from interpretation. First record what the item actually presents: names, headings, figures, formulas, quotations or stated propositions. Next consider why those details matter within the whole work. Finally compare them with another source from the same subject area. This process helps turn a long digital file into evidence that can be evaluated rather than merely skimmed.
The following is an editorial content guide based on the verified catalogue topics. It is not represented as the original author's formal table of contents. Use it to organise notes while moving through the 252 pages in the player.
Use this section of the reading guide to identify how C programming appears in GNU C Language Introduction and Reference Manual, note important terms, and connect the subject to the wider purpose of the work.
Use this section of the reading guide to identify how GNU C appears in GNU C Language Introduction and Reference Manual, note important terms, and connect the subject to the wider purpose of the work.
Use this section of the reading guide to identify how GCC appears in GNU C Language Introduction and Reference Manual, note important terms, and connect the subject to the wider purpose of the work.
Use this section of the reading guide to identify how Programming reference appears in GNU C Language Introduction and Reference Manual, note important terms, and connect the subject to the wider purpose of the work.
Use this section of the reading guide to identify how Programming tutorial appears in GNU C Language Introduction and Reference Manual, note important terms, and connect the subject to the wider purpose of the work.
Use this section of the reading guide to identify how Pointers appears in GNU C Language Introduction and Reference Manual, note important terms, and connect the subject to the wider purpose of the work.
Use this section of the reading guide to identify how Data types appears in GNU C Language Introduction and Reference Manual, note important terms, and connect the subject to the wider purpose of the work.
Use this section of the reading guide to identify how Floating-point arithmetic appears in GNU C Language Introduction and Reference Manual, note important terms, and connect the subject to the wider purpose of the work.
When a heading in the original differs from this guide, follow the original heading in your citation. Page numbers can also vary between editions. Doxxly's direct page field is useful for navigation, but formal references should include the title, creator, source and edition details available in the file itself.
Doxxly credits Umar M. Zephyr as the author or creator of GNU C Language Introduction and Reference Manual. This page does not add an unverified biography, job title or institutional affiliation. The attribution is preserved so readers can distinguish the creator from the hosting library and follow the original record when an external author link is available.
Author context matters because a work reflects a particular purpose, audience and point of view. Before relying on the material, consider what the creator set out to explain, when the source was produced and whether later research or revised guidance should also be consulted. For literature and philosophy, compare translations and editions; for technical material, check whether a newer version has superseded the one shown here.
The recorded source for this item is cs.unibo.it. Doxxly provides access and discovery tools but does not claim to be the original publisher unless explicitly stated. Source links, creator attribution and the recorded Publicly available file collected for editorial review licence are displayed to help readers assess provenance and permitted use.
Provenance is especially important for reports, standards, presentations and working spreadsheets. Check the original source for amendments, supporting files and current policy. A trustworthy research workflow keeps the source URL with any notes or downloaded copy, verifies important figures against the original, and avoids treating an archived document as automatically current.
Visit cs.unibo.itBegin with the title and opening pages, then use the guide above to decide whether to read sequentially or move to a particular topic. The Doxxly player provides previous and next navigation, a direct page field, zoom steps, fit-to-width and fit-to-page modes, rotation and fullscreen. These controls are useful when a page contains small type, a wide table, an image, a scanned layout or a dense sequence of notes.
The first five pages are open to every visitor. A plan unlocks the complete item and full-document search. Search is best used for distinctive names, technical terms or short phrases; broad words can produce too many possible contexts. When you find a useful passage, read the surrounding pages so that a sentence, chart or formula is not separated from its explanation.
If downloading is enabled, members can obtain the original PDF file. Keep the original format when formulas, slide sequencing, pagination or layout carries meaning. Respect the Publicly available file collected for editorial review terms displayed on this page, and use the rights-report link if you believe the attribution or availability needs review.
As you read GNU C Language Introduction and Reference Manual, ask which audience the creator addresses, what problem or idea organises the work, what evidence is presented, and which assumptions remain unstated. Note whether important terms are defined consistently and whether examples represent a broader pattern or a narrow case. For quantitative material, record units, time periods, formulas and data sources. For interpretive material, separate the creator's language from your own summary.
A second set of questions concerns relevance today. Which parts remain durable, which depend on their historical or institutional setting, and what would need confirmation from a newer source? Following the tags and the Technology & Security collection can reveal useful comparisons. Agreement between sources can strengthen confidence, while disagreement can point to changing definitions, methods, evidence or priorities.
Finally, decide what you need from the item: background knowledge, a quotation, a worked example, a model, a visual explanation or a starting bibliography. That purpose should guide the depth of reading and the notes you keep. Doxxly helps locate and navigate the source; careful interpretation remains the reader's responsibility.
Practical answers about reading, downloading and understanding this document on Doxxly.

National Institute of Standards and Technology

National Institute of Standards and Technology

National Institute of Standards and Technology

National Institute of Standards and Technology

National Institute of Standards and Technology

National Institute of Standards and Technology