Skip to content

Programming by Design

If you're not prepared to be wrong, you'll never come up with anything original. – Sir Ken Robinson

  • About
  • Java-PbD
  • C-PbD
  • ASM-PbD
  • Algorithms
  • Other

Category: C book

Chapter 6 – Functions

Posted on August 11, 2019November 22, 2024 By William Jojo
C book

(Updated November 22, 2024) Table of contents Overview Getting Started Functions Calling Our Functions void Functions Value-returning Functions Parameters Revisited Quiz Exercises Overview User-defined functions are created by the application writer to support a particular feature, to fulfill a specific need that has not already been met through standard predefined functions, and whenever we may … Read More “Chapter 6 – Functions” »

Chapter 5 – Iterative Control Structures

Posted on August 11, 2019November 21, 2024 By William Jojo
C book

Updated November 21, 2024 Table of contents Overview The while loop Range-based or Counter-based loop Sentinel-based loop Flag-based loop EOF-based loop The for loop The do-while loop The break and continue statements Nested Loops File Handling Safely Reading Numbers – Part III Building a Command Line Interface (CLI) Exercises Overview There is a clear need … Read More “Chapter 5 – Iterative Control Structures” »

Chapter 4 – Conditional Control Structures

Posted on August 11, 2019November 21, 2024 By William Jojo
C book

(Updated November 21, 2024) Table of contents Relational Operators One-way and two-way selection Compound Statements Multi-way selection The Dangling else Logical Operators The switch Statement Short-circuit Evaluation The ternary operator ?: Safely Reading Numbers – Part II Exercises Relational Operators Up to this point, our statements have been executed sequentially; they have been processed in … Read More “Chapter 4 – Conditional Control Structures” »

Chapter 3 – Input and Output

Posted on August 11, 2019November 21, 2024 By William Jojo
C book

(Updated November 21, 2024) Table of contents Basic User Output Basic User Input Strings Revisited Comparing Strings Searching Strings Duplicating Strings Introduction to Storage Classes Advanced Output With the printf() Function Input with the scanf() and fgets() Functions Safely Reading Numbers – Part I Random Numbers Quiz Exercises Basic User Output Here we will introduce … Read More “Chapter 3 – Input and Output” »

Chapter 2 – Elements of the C Language

Posted on August 11, 2019January 20, 2025 By William Jojo
C book

(Updated November 21, 2024) Table of contents Overview Components of the Language Data Types Using void and bool Arithmetic Operators and Precedence Constants, Literals, Variables, and const Strings Basic Input/Output Escape Increment, Decrement and Comments The main Function Quiz Exercises Overview This is an extensive chapter. Many components of the C programming language are presented … Read More “Chapter 2 – Elements of the C Language” »

Chapter 1 – The C Environment

Posted on June 6, 2019November 21, 2024 By William Jojo
C book

(Updated November 21, 2024) Table of contents Programming Environment The C Language The C runtime The C Standard(s) Final Thoughts About This Book Quiz Exercises Programming Environment The C programming language makes it easy to develop programs using a simple and modest set of language constructs. The C language is a subset of C++. C++ … Read More “Chapter 1 – The C Environment” »

Introduction

Posted on June 1, 2019June 2, 2024 By William Jojo
C book

This textbook follows a few basic teaching paradigms, which are as follows: Constructivism – the premise that learning occurs through the physical building (construction) of solutions. Therefore, this is a project-based approach. Throughout this textbook, there are two primary subplots. During what would be considered the first semester of study (Chapters 1 to 7), learners … Read More “Introduction” »

Acknowledgements

Posted on June 1, 2019March 25, 2023 By William Jojo
C book

August 2021 When I first began teaching, I knew nothing about how people learn, save one person – myself. The way I learned was nearly never the same as how others learned. So, after a couple of decades of honing my craft, I decided it was high time I invested in myself. My masters work … Read More “Acknowledgements” »

Posts pagination

Previous 1 2

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Copyright © 2018 – 2025 Programming by Design.