Page 1 of 16Free preview · 1–5

About this document

An introductory C programming book by Mike McGrath, using examples for Windows and Linux. The supplied excerpt includes the contents, preface, and Getting Started chapter, covering C fundamentals, GCC installation, writing and running a Hello World program, and the compilation process. The contents also lists chapters on variables, constants, operators, control flow, functions, pointers, strings, structures, file handling, and standard library references.

Free preview text

The first 5 pages, shown as text so search engines and readers can find this document.

Page 1

ContentsContents Getting Started 7 Introducing the C language 8 Installing a C compiler 10 Writing a C program 12 Compiling a C program 14 Understanding compilation 16 Summary 18 Storing Variable Values 19 Creating program variables 20 Displaying variable values 22 Inputting variable values 24 Qualifying data types 26 Using global variables 28 Registering variables 30 Converting data types 32 Creating array variables 34 Describing dimensions 36 Summary 38 Setting Constant Values 39 Declaring program constants 40 Enumerating constant values 42 Creating a constant type 44 Defining constants 46 Debugging definitions 48 Summary 50 Performing Operations 51 Doing arithmetic 52 Assigning values 54 Comparing values 56 Assessing logic 58 Examining conditions 60 Measuring size 62 Comparing bit values 64 4 1 2 3

Page 2

Flagging bits 66 Understanding precedence 68 Summary 70 Making Statements 71 Testing expressions 72 Branching switches 74 Looping for a number 76 Looping while true 78 Breaking out of loops 80 Going to labels 82 Summary 84 Employing Functions 85 Declaring functions 86 Supplying arguments 88 Calling recursively 90 Placing functions in headers 92 Restricting accessibility 94 Summary 96 Pointing to Data 97 Accessing data via pointers 98 Doing pointer arithmetic 100 Passing pointers to functions 102 Creating arrays of pointers 104 Pointing to functions 106 Summary 108 Manipulating Strings 109 Reading strings 110 Copying strings 112 Joining strings 114 Finding substrings 116 Validating strings 118 Converting strings 120 Summary 122 8 7 5 6

Page 3

Building Structures 123 Grouping in a structure 124 Defining type structures 126 Using pointers in structures 128 Pointing to structures 130 Passing structures to functions 132 Grouping in a union 134 Allocating memory 136 Summary 138 Producing Results 139 Creating a file 140 Reading & writing characters 142 Reading & writing lines 144 Reading & writing entire files 146 Scanning filestreams 148 Reporting errors 150 Getting the date and time 152 Running a timer 154 Generating random numbers 156 Displaying a dialog box 158 Summary 160 Reference Section 161 ASCII character codes 162 Input & output functions 164 Character test functions 173 String functions 174 Math functions 176 Utility functions 178 Diagnostic functions 180 Argument functions 180 Date & time functions 181 Jump functions 184 Signal functions 184 Limit constants 185 Float constants 186 Index 187 9 10 +

Page 4

Preface The creation of this book has provided me, Mike McGrath, a welcome opportunity to update my previous books on C programming with the latest techniques. All examples I have given in this book demonstrate C features supported by current compilers on both Windows and Linux operating systems, and the book’s screenshots illustrate the actual results produced by compiling and executing the listed code. Conventions in this book In order to clarify the code listed in the steps given in each example, I have adopted certain colorization conventions. Components of the C language itself are colored blue; numeric and string values are red; programmer-specified names are black; and comments are green, like this: /* Store then output a text string value. */ char *myMessage = “Hello from C” ; printf( myMessage ) ; Additionally, in order to identify each source code file described in the steps, a colored icon and file name appears in the margin alongside the steps: I sincerely hope you enjoy discovering the powerful expressive possibilities of C programming and have as much fun with it as I did in writing this book. Mike McGrath Grabbing the source code For convenience I have placed source code files from the examples featured in this book into a single ZIP archive, which you can obtain by following these easy steps: l1 Browse to www.ineasysteps.com then navigate to Free Resources and choose the Downloads section l2 Find C Programming in easy steps, 5th edition in the list, then click on the hyperlink entitled All Code Examples to download the archive l3 Now, extract the archive contents to any convenient location on your computer main.c header.h

Page 5

Welcome to the world of C. This chapter demonstrates how to create a C program in text, then how to compile it into executable byte form. Introducing the C language Installing a C compiler Writing a C program Compiling a C program Understanding compilation Summary 8 10 12 14 16 18 Getting Started1

Tags

Doxxly editorial guide

C Programming in easy steps, 5th edition: summary, contents and background

This guide helps you understand the scope of C Programming in easy steps, 5th edition 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.

Summary and overview

C Programming in easy steps, 5th edition is a 16-page documentcredited to Cleo Y. Ellwood. An introductory C programming book by Mike McGrath, using examples for Windows and Linux. The supplied excerpt includes the contents, preface, and Getting Started chapter, covering C fundamentals, GCC installation, writing and running a Hello World program, and the compilation process. The contents also lists chapters on variables, constants, operators, control flow, functions, pointers, strings, structures, file handling, and standard library references. It appears in the Education & Learning 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, Beginner programming, ANSI C, GCC, Windows, Linux, Programming tutorial, Standard C library 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.

Key topics and reader takeaways

The catalogue connects this document with C programming, Beginner programming, ANSI C, GCC, Windows, Linux, Programming tutorial, Standard C library. 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.

Table of contents and reading guide

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 16 pages in the player.

  1. Part 1

    C programming

    Use this section of the reading guide to identify how C programming appears in C Programming in easy steps, 5th edition, note important terms, and connect the subject to the wider purpose of the work.

  2. Part 2

    Beginner programming

    Use this section of the reading guide to identify how Beginner programming appears in C Programming in easy steps, 5th edition, note important terms, and connect the subject to the wider purpose of the work.

  3. Part 3

    ANSI C

    Use this section of the reading guide to identify how ANSI C appears in C Programming in easy steps, 5th edition, note important terms, and connect the subject to the wider purpose of the work.

  4. Part 4

    GCC

    Use this section of the reading guide to identify how GCC appears in C Programming in easy steps, 5th edition, note important terms, and connect the subject to the wider purpose of the work.

  5. Part 5

    Windows

    Use this section of the reading guide to identify how Windows appears in C Programming in easy steps, 5th edition, note important terms, and connect the subject to the wider purpose of the work.

  6. Part 6

    Linux

    Use this section of the reading guide to identify how Linux appears in C Programming in easy steps, 5th edition, note important terms, and connect the subject to the wider purpose of the work.

  7. Part 7

    Programming tutorial

    Use this section of the reading guide to identify how Programming tutorial appears in C Programming in easy steps, 5th edition, note important terms, and connect the subject to the wider purpose of the work.

  8. Part 8

    Standard C library

    Use this section of the reading guide to identify how Standard C library appears in C Programming in easy steps, 5th edition, 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.

About Cleo Y. Ellwood

Doxxly credits Cleo Y. Ellwood as the author or creator of C Programming in easy steps, 5th edition. 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.

About the source organisation

The recorded source for this item is ineasysteps.com. 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 ineasysteps.com

How to read and use this document

Begin 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.

Research questions to consider

As you read C Programming in easy steps, 5th edition, 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 Education & Learning 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.

Explore more Education & Learning resources

Frequently asked questions about C Programming in easy steps, 5th edition

Practical answers about reading, downloading and understanding this document on Doxxly.

More in Education & Learning