Leanpub Header

Skip to main content

C Quick Learning

A Practical and Compact Introduction with Complete Examples

Learn C the right way—clearly, compactly, and with complete examples. This book focuses on core concepts, practical code, and real program output, making it ideal for readers who value clarity over verbosity.

Minimum price

$13.00

$18.00

You pay

$18.00

Author earns

$14.40
$

...Or Buy With Credits!

You can get credits with a paid monthly or annual Reader Membership, or you can buy them here.
PDF
EPUB
About

About

About the Book

C is often regarded as an "unsafe" programming language, frequently blamed for elusive bugs or, in worse cases, system crashes. This perception is not entirely accurate. When software written in C fails, the root cause is almost always improper usage rather than the language itself.

C is a simple language with relatively few modern features—and that simplicity is precisely its strength. C gives programmers full control and places responsibility for design, memory, and execution squarely in their hands. When used correctly and with discipline, C is no longer a liability but a powerful tool for building reliable, high-performance software.

C Quick Learning is a C programming course presented in book form. It covers the essential core concepts that every C programmer must understand, organized systematically from the ground up and assuming no prior knowledge of C. Each topic is explained in a compact and focused manner, accompanied by complete, runnable examples that readers can compile and experiment with directly.

This book is intended for anyone who wants to learn C properly in a relatively short time, offering the structure and rigor of a professional course in the practical and accessible format of a book.

Author

About the Author

Budi Raharjo

Two decades of expertise in software engineering and technical training.

Contents

Table of Contents

Preface

Chapter 1. Introduction to C

  1. Installing GCC
  2. Structure of a C Program
  3. Program Construction Stages (Executable File)
  4. Creating and Running a C Program
  5. Creating a C Program Using Geany
  6. Statements
  7. Comments
  8. C Is Case-Sensitive
  9. Displaying Data
  10. Reading Data

Chapter 2. Variables and Data Types

  1. Declaring Variables
  2. Variable Naming Rules
  3. Variable Initialization
  4. Constants
  5. Data Types
  6. The typedef Keyword
  7. Type Conversion

Chapter 3. Operators

  1. Assignment Operators
  2. Arithmetic Operators
  3. Relational Operators
  4. Logical Operators
  5. Bitwise Operators

Chapter 4. Selection

  1. The if Statement
  2. The switch Statement
  3. Conditional Operator

Chapter 5. Loops

  1. The while Statement
  2. The for Statement
  3. The do-while Statement
  4. Jump Statements

Chapter 6. Pointers and Memory Management

  1. Memory Addresses
  2. Declaring Pointers
  3. Assigning Values to Pointers
  4. NULL Pointers
  5. Untyped Pointers
  6. The const Keyword in Pointer Declarations
  7. Pointer to Pointer
  8. Dynamic Memory Allocation
  9. Common Pointer Mistakes

Chapter 7. Functions

  1. Types of Functions
  2. Defining Functions
  3. Calling Functions
  4. Local and Global Variables
  5. Function Parameters

Chapter 8. Numbers

  1. Printing Real Numbers with a Specific Precision
  2. Rounding Real Numbers
  3. Exponentiation
  4. Computing Square Roots
  5. Computing Absolute Values
  6. Computing Logarithms
  7. Converting Numbers to Strings
  8. Converting Strings to Numbers
  9. Trigonometric Functions

Chapter 9. Arrays

  1. Declaring Arrays
  2. Accessing Array Elements
  3. Dynamic Arrays
  4. Array Initialization
  5. Two-Dimensional Arrays
  6. Accessing Elements of a Two-Dimensional Array
  7. Initializing Two-Dimensional Arrays
  8. Arrays as Function Parameters
  9. Arrays as Function Return Values
  10. Pointer to an Array
  11. Common Array Mistakes

Chapter 10. String

  1. Declaring String Variables
  2. Assigning Values to String Variables
  3. Getting the Length of a String
  4. Comparing Strings
  5. Converting a String to Uppercase
  6. Converting a String to Lowercase
  7. Copying a Substring
  8. Searching for a Character in a String
  9. Searching for a Substring in a String
  10. Common String Mistakes

Chapter 11. Enumeration

  1. Defining an Enumeration
  2. Declaring Enumeration Variables
  3. Assigning Values to Enumeration Variables
  4. Ordinal Values in Enumerations
  5. Displaying Enumeration Values as Strings
  6. Enumeration Scope
  7. Common Enumeration Mistakes

Chapter 12. Structures and Unions

  1. Defining a Structure
  2. Declaring Structure Variables
  3. Accessing Structure Members
  4. Initializing Values in Structure Variables
  5. Arrays of Structures
  6. Structures as Function Parameters
  7. Structures as Function Return Values
  8. Pointers to Structures
  9. Defining a Union
  10. Declaring Union Variables
  11. Accessing Union Members
  12. Pointers to Unions
  13. Common Structure and Union Mistakes

Chapter 13. File Handling

  1. Declaring a File Pointer
  2. Opening a File
  3. Closing a File
  4. Writing Data to a File
  5. Reading Data from a File
  6. Common File Handling Mistakes

Chapter 14. Program Code Modularization

  1. The #include Directive
  2. Splitting Program Code Without Header Files
  3. Creating a Header File
  4. Using a Header File
  5. Scope, Interfaces, and Implementation Boundaries
  6. Common Modularization Mistakes

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.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

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

In fact, authors have earned over $14 million writing, publishing and selling 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