๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Practical C: A comprehensive guide to the C programming language

โœ Scribed by Jackiewicz, Rafal


Publisher
Independently Published
Year
2024
Tongue
English
Leaves
767
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


This book is a comprehensive guide on the C programming language, offering a blend of foundational knowledge and practical applications. Starting with a brief about the author, the book delves into the history, importance, and workings of the C compiler, differentiating between source files and header files. It guides readers through a comprehensive understanding of static and dynamic libraries and their interaction with CMake.
The second chapter dives deep into C's basic syntax, data types, operators, control structures, and key elements such as size_t, typedef, sizeof, and the volatile keyword. This section also provides a detailed explanation of error handling, structures, enumerations, functions, arrays, strings, and pointers.
The third chapter stands out due to its focus on practical C programming, including bit manipulation, list, set, and map data structures, socket programming, file processing, and concurrency. It covers graphic programming with OpenGL, audio files, parallel computing with OpenCL and CUDA, and the comparison between them. It explores data integrity, privacy with asymmetric encryption, and securing sensitive data. This section also features interfacing C with assembly language, Java, Python, shell commands, and specifics about memory location access.
The fourth chapter emphasizes safety-critical code development, presenting the Power of 10 rules. The fifth chapter elucidates code optimization techniques, debugging, testing with GDB, and the Check framework for unit testing, highlighting common pitfalls.
Finally, the book culminates with a chapter providing practical projects and exercises for self-assessment, including solutions and explanations. This book serves as an extensive resource for both beginners and advanced learners aiming to master C programming.

โœฆ Table of Contents


Practical C
A comprehensive guide to the C programming language
About Author
About Book
Contents at a Glance
Table of Contents
Chapter 1: Introduction to C Programming
1.1 History and Importance of C
1.2 Understanding the C Compiler
1.3 Source Files and Header Files
1.4 Compilation Switches and Parameters
1.5 C Linkage and Name Mangling
1.6 An In-Depth Look at Static and Dynamic Libraries
1.6.1 Creating and Using Static Libraries
1.6.2 Using a Static Library
1.6.3 Creating and Using Dynamic Libraries
1.6.4 Using a Dynamic Library
1.7 Static and Dynamic Libraries with CMake
1.7.1 Creating a Static Library with CMake
1.7.2 Using a Static Library with CMake
1.7.3 Creating a Dynamic Library with CMake
1.7.4 Using a Dynamic Library with CMake
Chapter 2: Getting Started with C
2.1 Basic Syntax
2.2 Data Types and Variables
2.2.1 Basic Data Types
2.2.2 Variables
2.2.3 Constants
2.3 Operators and Expressions
2.3.1 Arithmetic Operators
2.3.2 Relational Operators
2.3.3 Logical Operators
2.4 Control Structures
2.4.1 Conditional Statements
2.4.2 Loops
2.4.3 The Ternary Operator
2.5 Understanding size_t
2.6 Understanding typedef keyword
2.7 The sizeof Operator
2.8 Understanding the volatile Keyword
2.9 The const volatile Combination
2.10 Error Handling in C
2.11 Structures
2.11.1 Nested Structures
2.11.2 Manipulating Structs in an Array with memcpy
2.12 Enumerations (enum)
2.13 Functions
2.14 Arrays and Strings
2.15 Pointers
2.16 Understanding Pointer Arithmetic
2.17 Memory Management
2.18 Common C Libraries and Their Functions
2.18.1 Math Library Functions
2.18.2 Time Library Functions
2.18.3 String Library Functions
2.18.4 Input/Output Functions
2.18.5 Standard Library Functions
2.18.6 CTYPE Library Functions
2.19 Streams
2.20 Buffer Overflow Management and Stream Redirection
Chapter 3: Practical C
3.1 An Introduction to Numeral Systems
3.1.1 Converting Binary Formats
3.1.2 Converting Hexadecimal Formats
3.2 Bit Manipulation Techniques
3.3 Bitwise operators in certain mathematical operations
3.3.1 Multiplication by Powers of Two
3.3.2 Division by powers of two
3.3.3 Addition and subtraction of powers of two
3.4 List, Set, and Map
3.4.1 Usage of List, Set, and Map with GLib
3.5 Measuring Execution Time and Clock Ticks
3.6 Socket Programming: TCP/IP and UDP
3.6.1 TCP/IP Protocol
3.6.1.1 TCP Server
3.6.1.2 TCP Client
3.6.2 UDP Protocol
3.6.2.1 UDP Server
3.6.2.2 UDP Client
3.7 Understanding the HTTP Protocol
3.7.1 Sending HTTP (CRUD) Methods with Sockets
3.7.2 Processing HTTP (CRUD) Methods with Sockets
3.7.3 Sending HTTP (CRUD) Methods using libcurl
3.7.4 Processing HTTP (CRUD) Methods with libevent
3.8 Serial Port Programming
3.8.1 Opening and Configuring a Serial Port
3.8.2 Reading from and Writing to the Serial Port
3.9 Establishing Database Connections
3.9.1 MySQL Database
3.9.2 PostgreSQL Database
3.9.3 SQLite Database
3.9.4 MongoDB Database
3.9.5 Cassandra Database
3.10 File Processing (I/O Operations)
3.10.1 Handling Text Strings in Files
3.10.2 Buffered File Handling
3.10.3 Writing and Reading Structures to/from Files
3.10.4 File Positioning with fseek (simple database in C)
3.10.5 Parsing XML
3.10.6 Parsing JSON
3.10.7 Parsing CSV
3.10.8 Working with ZIP files
3.10.8.1 Decompressing a ZIP File
3.10.8.2 Compressing a ZIP File
3.10.9 Working with PDF files
3.10.9.1 Basic Text Extraction from PDF page
3.10.9.2 Detecting if PDF page is text or image
3.10.9.3 Converting Specific PDF Pages to Images
3.10.9.4 Converting PDF Page to Image using Poppler's C API
3.11 Concurrency
3.11.1 Understanding pthread_create and pthread_join
3.11.2 Passing Parameters to Thread Functions
3.11.3 Locks, Mutexes, Semaphores, and Condition Variables
3.11.4 Avoiding Deadlocks and Race Conditions
3.12 Graphics programming with OpenGL
3.12.1 Drawing Simple Shapes with OpenGL
3.12.2 Creating Simple Animations with OpenGL
3.12.3 Handling Mouse Events in OpenGL
3.13 Image Operations and Graphic Formats
3.13.1 Displaying an Image with the SDL library
3.13.2 Image conversion with Leptonica library
3.13.3 Image Scaling with Leptonica library
3.13.4 Image Rotation with Leptonica library
3.13.5 Image Difference Extraction with Leptonica library
3.13.6 Contrast stretching with Leptonica library
3.13.7 Image Translation with Leptonica library
3.13.8 Image Sharpening with Leptonica library
3.13.9 Image Blurring with Leptonica library
3.13.10 Brightness adjustment with Leptonica library
3.13.11 Converting to grayscale with Leptonica library
3.13.12 Image Thresholding with Leptonica library
3.13.13 Image Blending with Leptonica library
3.13.14 Extracting text from Image with Leptonica and Tesseract
3.13.15 The SVG (Scalable Vector Graphics) Format
3.13.15.1 Creating SVG with Cairo and librsvg library
3.13.16 The Drawing Exchange Format (DXF)
3.13.16.1 Simplified example of DXF file in plain C
3.13.17 The Wavefront OBJ Format
3.13.17.1 Simplified examples of OBJ in plain C
3.13.17.2 Creating OBJ with CGLM library
3.13.18 The STL (Stereolithography) Format
3.13.18.1 Creating a 3D Cube as an STL in plain C
3.13.18.2 Creating a 3D Sphere as STL in plain C
3.14 Audio Files
3.14.1 Converting Audio Files
3.14.1.2 WAV to FLAC with libFLAC library
3.14.1.3 FLAC to WAV with libsndfile library
3.14.1.4 PCM to AAC with FAAC library
3.14.1.5 WAV to MP3 with lame library
3.14.1.6 MP3 to WAV with mpg123 and sndfile library
3.14.1.7 PCM to WAV and WAV to PCM
3.14.1.8 Getting properties of WAV file
3.14.2 Digital Sound Operations
3.14.2.1 Normalization of Audio
3.14.2.2 Amplitude Compression of Audio
3.14.2.3 Audio Reversal
3.14.2.4 Audio Mixing
3.14.2.5 Echo Effect
3.14.2.6 Reverb Effect
3.14.3 Extracting Audio Features with aubio library
3.14.4 Playing Audio with SDL library
3.15 Parallel computing with OpenCL
3.15.1 Enumerating OpenCL Devices
3.15.2 Adding Numbers with OpenCL
3.15.3 Vector Addition with OpenCL
3.15.4 Matrix Multiplication with OpenCL
3.15.5 Monte Carlo Simulation with OpenCL
3.15.6 Complete N-body Simulation with OpenCL
3.15.7 Prime Numbers with OpenCL
3.15.8 Image Processing with OpenCL
3.16 Parallel computing with CUDA from NVIDIA
3.16.1 Adding Numbers using CUDA
3.16.2 Prime Numbers using CUDA
3.16.3 Matrix Multiplication using CUDA
3.16.4 Image Processing using CUDA
3.17 Cuda vs OpenCL
3.18 Checking integrity of data
3.18.1 Cyclic Redundancy Check
3.18.1.1 Cyclic Redundancy Check (cksum) in plain C
3.18.1.2 CRC32 in plain C
3.18.2 Cryptographic Hash Functions
3.18.2.1 MD5 in plain C
3.18.2.2 SHA256 in plain C
3.18.2.3 SHA256 with OpenSSL
3.18.2.4 SHA3-256 with OpenSSL
3.18.2.5 BLAKE2 with B2
3.18.2.6 Whirlpool with OpenSSL
3.18.2.7 RIPEMD-160 with OpenSSL
3.19 Ensuring Privacy through Asymmetric Encryption
3.19.1 Unravelling the Process of Secure Messaging
3.19.2 Introduction to OpenSSL command-line tool
3.19.3 Simplifying Secure Messaging: A Focus on Core Functions in C
3.19.3.1 Keys Generation
3.19.3.2 Verifying the key pair
3.19.3.3 Encryption
3.19.3.4 Decryption
3.19.3.5 Data Transfer
3.20 Secure Communications with SSL and TLS
3.20.1 Secure Handshake Implementation using OpenSSL
3.20.2 Communicating and Processing Server Response with OpenSSL
3.20.3 Implementing a Secure Server Using OpenSSL
3.20.4 Bidirectional Communication in a Secure Server Using OpenSSL
3.20 Securing Sensitive Data in Memory
3.21 Regular Expressions with Oniguruma Library
3.22 Embedding Assembly Language in C
3.23 Extending Java with User-Created Libraries in C
3.24 Extending Python with User-Created Libraries in C
3.25 Executing Shell Commands in C
3.26 Detecting the Operating System in C
3.27 Accessing Specific Memory Locations in C
Chapter 4: The Power of 10: Rules for Developing Safety-Critical Code
4.1 Introduction to Safety-Critical Code
4.2 Understanding the Power of 10 Rules
Chapter 5: Optimization Techniques, Debugging and Testing
5.1 Code Optimization Techniques
5.2 Debugging and Testing Your Code with GDB
5.3 Unit testing C code with Check framework
5.3.1 Setting Up the Check Framework on Linux and Windows
5.3.2 Writing and Running Unit Tests
5.4 Common Pitfalls and How to Avoid Them
Chapter 6: Projects and Exercises
6.1 Practical Projects to Apply Your Knowledge
6.2 Exercises for Self-Assessment
6.3 Solutions and Explanations
Index
1
3
4
5
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Z


๐Ÿ“œ SIMILAR VOLUMES


C# Mastery: A Comprehensive Guide to Pro
โœ Kameron Hussain; Frahaan Hussain ๐Ÿ“‚ Library ๐Ÿ“… 2023 ๐Ÿ› Sonar Publishing ๐ŸŒ English

<p>"C# Mastery: A Comprehensive Guide to Programming in C#"</p><p>ย </p><p>Unlock the full potential of C# with this comprehensive guide! Whether you're a beginner looking to dive into the world of programming or an experienced developer seeking to sharpen your C# skills, this book is your one-stop r

LINQ Quickly: A practical guide to progr
โœ N Satheesh Kumar ๐Ÿ“‚ Library ๐Ÿ“… 2007 ๐Ÿ› Packt Publishing ๐ŸŒ English

This book gets you started with LINQ and shows how it will make your programming life easier by making use of new features from the .NET Framework 3.0. This book is split into seven chapters, each of which is dedicated to presenting a feature of LINQ and its usage in real-life scenarios. Language I

Mastering C++: A Comprehensive Beginner'
โœ Chloe Annable ๐Ÿ“‚ Library ๐Ÿ“… 2023 ๐Ÿ› Chloe Annable ๐ŸŒ English

Are you dealing with massive data volumes at work or in your hobbies? Need a powerful, reliable programming language to handle such demands? Look no further than this book! Packed with essential design and development insights, it swiftly introduces you to C++ concepts, enabling you to craft program

CNC Programming Handbook - A Comprehensi
โœ Smid, Peter ๐Ÿ“‚ Library ๐Ÿ“… 2007 ๐Ÿ› Industrial Press ๐ŸŒ English

This book has earned the title of de facto standard for training as well as reference content at all levels of computer numerical control programming. Hundreds of educational institutions around the world use the handbook as the primary text for CNC courses. And thousands of programmers and machine

CNC programming handbook : a comprehensi
โœ Smid, Peter ๐Ÿ“‚ Library ๐Ÿ“… 2008 ๐Ÿ› Industrial Press ๐ŸŒ English

<div><P>Over its first two editions, this best-selling book has become the de facto standard for training and reference material at all levels of CNC programming. Used in hundreds of educational institutions around the world as the primary text for CNC courses, and used daily by many in-field CNC pr

Zero to Py : A Comprehensive Guide to Le
โœ Michael Green ๐Ÿ“‚ Library ๐Ÿ“… 2023 ๐Ÿ› Leanpub ๐ŸŒ English

A comprehensive guide to learning the Python programming language, written so to be accessible to readers of all levels, from beginner python developers to those who have some experience with python. Even more advanced users may find some utility from the later chapters. This book aims to be a co