This introductory guide, "C Programming," is designed to equip you with the fundamental knowledge and skills needed to start your journey into the realm of programming using the C language. Throughout this guide, we will cover a wide range of topics, starting from the basic concepts of programming to more advanced techniques. Whether you're completely new to programming or looking to expand your skills, this resource will provide you with a solid foundation in C programming.
1. Introduction π‘
- First C Program
- Building/Compiling
- Compiler Errors
- Compiler Warnings
- Linker Errors
- Runtime Errors
- Logic Errors
- Structure of a C Program
2. Basic Concepts π
- Overview
- Basic Data Types
- Enums and Chars
- Create and Use an Enum Type
- Format Specifiers
- Command Line Arguments
4. Operators β
5. Control Flow π
6. Arrays π
7. Functions ποΈ
- Basics
- Defining Functions
- Arguments and Parameters
- Returning Data from Functions
- Local and Global Variables
8. Character Strings π€
- Overview
- Defining a String
- Constant Strings
- Common String Functions
- Searching, Tokenizing, and Analyzing Strings
- Converting Strings
9. Debugging π
- Configuring the Debugger in VS Code
- What is Debugging?
- Understanding the Call Stack
- VS Code Debugger
- Common C Mistakes
- Understanding Compiler Errors
10. Pointer Basics π
14. Structures ποΈ
- Creating and Using Structures
- Structures and Arrays
- Nested Structures
- Structures and Pointers
- Structures and Functions
17. Working with Larger Programs ποΈ
- Overview
- Compiling Multiple Source Files from the Command Line
- Makefiles
- Communication Between Files
- Using Header Files Effectively
- Heap and Stack Memory Allocation
18. Storage Classes ποΈ
- The
#define
Statement (Constants) - Using
typedef
- Variable Length Arrays
- Challenge: Variable Length Arrays
- Flexible Array Members
- Challenge: Flexible Array Members
- Complex Number Types
- Challenge: Complex Number Types
- Designated Initializers
- Demonstration: Challenge Solutions
20. Type Qualifiers π·οΈ
21. Bit Manipulation π’
- Binary Numbers and Bits
- Challenge: Binary Numbers and Bits
- Demonstration: Binary Numbers and Bits
- Bitwise Operators (Logical)
- Bitwise Operators (Shifting)
- Challenge: Bitwise Operators
- Demonstration: Bitwise Operators
- Bitmasks
- Using Bit Operators to Pack Data
- Challenge: Setting and Reading Bits
- Demonstration: Setting and Reading Bits
- Using Bit Fields to Pack Data
- Challenge: Using Bit Fields to Pack Data
- Demonstration: Using Bit Fields to Pack Data
- The
goto
Statement - Challenge: The
goto
Statement - The Null Statement
- The Comma Operator
setjmp
andlongjmp
Functions- Challenge:
setjmp
andlongjmp
Functions - Demonstration: Advanced Control Flow
23. Input and Output π₯οΈ
char
Functions (Input)char
Functions (Output)- Challenge:
char
Functions - Demonstration:
char
Functions - String Functions
- Challenge: String Functions
- Demonstration: String Functions
- Formatting Functions
- Challenge: Formatting Functions
- Demonstration: Formatting Functions
24. Advanced Function Concepts ποΈ
- Variadic Functions
va_copy
- Challenge: Variadic Functions
- Demonstration: Variadic Functions
- Recursion
- Challenge: Recursion
- Demonstration: Recursion
- Inline Functions
_Noreturn
Functions
25. Unions π
26. The Preprocessor π οΈ
27. Macros π§
- Overview
- Macros vs. Functions
- Creating Your Own Macros
- Preprocessor Operators
- Predefined Macros
- Challenge: Macros
- Demonstration: Macros
- GCC Compiler Options (Part 1)
- GCC Compiler Options (Part 2)
- Debugging with the Preprocessor
- Debugging with
gdb
(Part 2) - Core Files
- Profiling
- Static Analysis
- Challenge
- Demonstration
- Double Pointers (Pointer to a Pointer)
- Double Pointers (Pointer to a Pointer) Part 2
- Debugging with
gdb
(Part 1) - Challenge: Double Pointers
- Demonstration: Double Pointers
- Function Pointers
- Challenge: Function Pointers
- Demonstration: Function Pointers
- Void Pointers
- Overview
- Creating a Static Library (Archive)
- Challenge: Static Library
- Demonstration: Static Library
- Creating a Dynamic Library (Shared Object)
- Challenge: Dynamic Library
- Demonstration: Dynamic Library
- Dynamically Loading a Shared Object
- Challenge: Dynamic Loading
- Demonstration: Dynamic Loading
Assert
- General Utilities (
stdlib.h
) - General Utilities (
stdlib.h
) Part 2 - General Utilities (
stdlib.h
) Part 3 - Date and Time Functions
- Challenge
- Demonstration
32. Data Structures ποΈ
- Abstract Data Types
- Linked Lists (Overview)
- Linked Lists (Implementation)
- Challenge: Linked Lists
- Demonstration: Linked Lists
- Stacks (Overview)
- Stacks (Implementation)
- Queues (Overview)
- Queues (Implementation)
- Binary Trees (Overview)
- Binary Trees (Implementation)
- Interprocess Communication
- Signals (Overview)
- Raising a Signal
- Handling a Signal Using the
signal
Function - Handling a Signal Using
sigaction
- The
fork()
System Call - Challenge
- Demonstration