Black Friday Deals For Authors Are On Now!

Leanpub Header

Skip to main content

C Without Printf

Build a Low-Level I/O Library From Ground Zero

C Without Printf
This book is 10% completeLast updated on 2026-11-26

C is not a big language when compared to C++ or Java, nor are you required to memorize every function in the standard library. Almost any text-based program can be constructed using 5 functions: fwrite, fread, fopen, fclose, fseek. The rest is learning the concepts of variables and types that are fundamental to all computer programming languages.

Minimum price

$10.00

$15.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
About

About

About the Book

In this book, I intend to give new programmers a quick introduction to the C Programming Language, its history, and how to use it for the problems it was designed to be used for. The C language refuses to die, despite bogus claims from online trolls who are probably not very good programmers.

In 1973, Dennis Ritchie and Ken Thompson rewrote the Unix operating system from PDP-11 Assembly language into C. Until this time, high-level languages were just too slow to be usable on the hardware available. C changed the world because it became a Portable Assembly Language. That is, each operating system with a C compiler can translate C code into Assembly language.

In 1978, Brian Kernighan and Dennis Ritchie published the first edition of the book: The C Programming Language. This book became the unofficial standard for how programmers learned to use the language. A second edition of the book was published in 1988, which reflected some improvements since the original book after the language had evolved. This book is still essential for anyone who needs a complete understanding of the language.

In 1989, the language was standardized by the American National Standards Institute. This is referred to as ANSI for short, and is the origin of the -ansi compiler flag, which is used in popular compilers like GCC and Clang. Having a standard is important for making programs that can run on the maximum number of possible machines, despite them having different Central Processing Units(like Intel, ARM, or RISC-V) and operating systems(Linux, DOS, Windows, macOS). Because of C’s reputation as a Portable Assembly Language, it is usually recommended by experts as a great programming language to start with if you have not done programming before.

I was born in 1987, and am blessed to see how far technology has improved during my lifetime. I have also seen many failed attempts to replace C with newer languages such as Java, Rust, and Zig. However, people are mistaken about the reasons the C programming language has been in use for over 50 years since it was invented as an extension of the B programming language. When I was 14, I learned C, and now, at the age of 39, I have 25 years of experience using it as my dominant language.

People who have read my Assembly Arithmetic Algorithms series will feel at home in this book because I use it to teach fundamental computer science principles, even when this requires teaching difficult subjects like pointers. It is worth mentioning that every single program from my Assembly books started as a C program first because it is the fastest language for me to write new tools in and finish designing them before I model the Assembly program to behave the same way.

The reason that this book is titled “C Without Printf” is because it shows how to build an input/output library from more basic low-level functions. Although printf is an extremely useful function that is part of the C Standard Library, programmers tend to rely on it so much that they don’t learn the bits and bytes that make up the numbers and strings they are trying to print.

My opinion on the printf function is the same as my opinion on other programming languages like C++, Java, and Python. These languages do a lot of extra things for the programmer and, in my opinion, have caused some of them to become lazy and just let compilers and standards organizations bring them new features and functions rather than learning anything about how computers work.

Such programmers may get started programming and may even write useful and fun programs, but then when they learn a new programming language or face a new problem, they are left without the fundamental knowledge to solve it. My book is intended to fix this failure of how computer programming is taught.

To sum this book up in a sentence: You must learn to walk before you can drive a car. By this, I mean that you will move slower at first, but when the road is covered in ice and it is unsafe to drive, you can remember how to walk the difficult path through the grass, dirt, and snow.

Where we’re going, we don’t need roads” - Christopher Lloyd in Back to the Future(1985)

Share this book

Categories

Author

About the Author

Chastity White Rose

Chastity White Rose is an author of over twelve books and two WordPress blogs. She writes humorous and educational content about philosophical and religious topics. She also uses her writing and graphic design skills to teach people about the game of Chess. She is a Creative Writing graduate from Full Sail University with self-taught computer programming and graphic design skills. As a transgender Christian woman, she writes books and blog posts to help others like her process the seeming disconnect between religious faith and an LGBTQIA+ identity. She measures the success of her writing by its emotional impact rather than its sales. For this reason, most of her writing is available free of charge.

Contents

Table of Contents

C Without Printf

Preface

Introduction

  1. Installing GCC on Linux
  2. Installing GCC on Windows
  3. The First Program
  4. makefile

Chapter 1: Commentary on The First Program

  1. Each Line Explained
  2. Bonus Exercise

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub