Computer ScienceScience & MathematicsEconomics & FinanceBusiness & ManagementPolitics & GovernmentHistoryPhilosophy

Beej's Guide to C Programming

by Brian "Beej Jorgensen" Hall

Beej's Guide to C Programming

Subscribe to new books via dBooks.org telegram channel

Join
DescriptionTable of ContentsDetailsHashtagsReport an issue

Book Description

This is an intro to C for folks who already know how to program in another language. The first half of the book is written in a tutorial style, while the second half is a reference section complete with examples (inspired by the incomparable Turbo C Bible). The goal is to keep this up-to-date with the latest C standards.

This guide assumes that you've already got some programming knowledge under your belt from another language, such as Python, JavaScript, Java, Rust, Go, Swift, etc. (Objective-C devs will have a particularly easy time of it!)

This open book is licensed under a Open Publication License (OPL). You can download Beej's Guide to C Programming ebook for free in PDF format (4.3 MB).

Table of Contents

Chapter 1
Foreword
Chapter 2
Hello, World!
Chapter 3
Variables and Statements
Chapter 4
Functions
Chapter 5
Pointers - Cower In Fear!
Chapter 6
Arrays
Chapter 7
Strings
Chapter 8
Structs
Chapter 9
File Input/Output
Chapter 10
typedef: Making New Types
Chapter 11
Pointers II: Arithmetic
Chapter 12
Manual Memory Allocation
Chapter 13
Scope
Chapter 14
Types II: Way More Types!
Chapter 15
Types III: Conversions
Chapter 16
Types IV: Qualifiers and Specifiers
Chapter 17
Multifile Projects
Chapter 18
The Outside Environment
Chapter 19
The C Preprocessor
Chapter 20
structs II: More Fun with structs
Chapter 21
Characters and Strings II
Chapter 22
Enumerated Types: enum
Chapter 23
Pointers III: Pointers to Pointers and More
Chapter 24
Bitwise Operations
Chapter 25
Variadic Functions
Chapter 26
Locale and Internationalization
Chapter 27
Unicode, Wide Characters, and All That
Chapter 28
Exiting a Program
Chapter 29
Signal Handling
Chapter 30
Variable-Length Arrays (VLAs)
Chapter 31
goto
Chapter 32
Types Part V: Compound Literals and Generic Selections
Chapter 33
Arrays Part II
Chapter 34
Long Jumps with setjmp, longjmp
Chapter 35
Incomplete Types
Chapter 36
Complex Numbers
Chapter 37
Fixed Width Integer Types
Chapter 38
Date and Time Functionality
Chapter 39
Multithreading
Chapter 40
Atomics
Chapter 41
Function Specifiers, Alignment Specifiers/Operators
Chapter 42
<assert.h> Runtime and Compile-time Diagnostics
Chapter 43
<complex.h> Complex Number Functionality
Chapter 44
<ctype.h> Character Classification and Conversion
Chapter 45
<errno.h> Error Information
Chapter 46
<fenv.h> Floating Point Exceptions and Environment
Chapter 47
<float.h> Floating Point Limits
Chapter 48
<inttypes.h> More Integer Conversions
Chapter 49
<iso646.h> Alternative Operator Spellings
Chapter 50
<limits.h> Numeric Limits
Chapter 51
<locale.h> locale handling
Chapter 52
<math.h> Mathematics
Chapter 53
<setjmp.h> Non-local Goto
Chapter 54
<signal.h> signal handling
Chapter 55
<stdalign.h> Macros for Alignment
Chapter 56
<stdarg.h> Variable Arguments
Chapter 57
<stdatomic.h> Atomic-Related Functions
Chapter 58
<stdbool.h> Boolean Types
Chapter 59
<stddef.h> A Few Standard Definitions
Chapter 60
<stdint.h> More Integer Types
Chapter 61
<stdio.h> Standard I/O Library
Chapter 62
<stdlib.h> Standard Library Functions
Chapter 63
<stdnoreturn.h> Macros for Non-Returning Functions
Chapter 64
<string.h> String Manipulation
Chapter 65
<tgmath.h> Type-Generic Math Functions
Chapter 66
<threads.h> Multithreading Functions
Chapter 67
<time.h> Date and Time Functions
Chapter 68
<uchar.h> Unicode utility functions
Chapter 69
<wchar.h> Wide Character Handling
Chapter 70
<wctype.h> Wide Character Classification and Transformation
Chapter 71
Exercises

Book Details

Title
Beej's Guide to C Programming
Subject
Computer Science
Publisher
Self-publishing
Published
2022
Pages
752
Edition
1
Language
English
PDF Size
4.3 MB
License
Open Publication License

Book Hashtags

Related Books

Beej's Guide to Network Programming
Back in the mid 90s, Beej got tired of all his friends asking him how to do this stuff with networking programming in C, so he put pen to paper on the early World Wide Web and wrote down everything he knew just to get them off his back. Since then, the Guide has expanded significantly, with plenty of examples, and covers IPv6. Inside you'll fi...
Invent Your Own Computer Games with Python
Invent Your Own Computer Games with Python teaches you how to program in the Python language. Each chapter gives you the complete source code for a new game, and then teaches the programming concepts from the examples. Games include Guess the Number, Hangman, Tic Tac Toe, and Reversi. This book also has an introduction to making games with 2D graph...
Learn Programming
This book is aimed at readers who are interested in software development but have very little to no prior experience. The book focuses on teaching the core principles around software development. It uses several technologies to this goal (e.g. C, Python, JavaScript, HTML, etc.) but is not a book about the technologies themselves. The reader will le...
A Practical Guide to TPM 2.0
A Practical Guide to TPM 2.0: Using the Trusted Platform Module in the New Age of Security is a straight-forward primer for developers. It shows security and TPM concepts, demonstrating their use in real applications that the reader can try out. Simply put, this book is designed to empower and excite the programming community to go out and do co...
Field Guide to the Distributed Development Stack
When you explore a new technology landscape, the journey can take you to places you never expected. Take O'Reilly's CTO, Andrew Odewahn. While working on ideas for a new publishing platform, Andrew kept notes as he probed the depth and breadth of what we call the "distributed development stack" (DDS). As patterns emerged, and...
Earth 2020
Fifty years have passed since the first Earth Day, on 22 April 1970. This accessible, incisive and timely collection of essays brings together a diverse set of expert voices to examine how the Earth's environment has changed over this past half century, and what lies in store for our planet over the coming fifty years. Earth 2020: An Inside...