A comprehensive collection of notes, code snippets, and hands-on projects documenting my journey through the C programming language.
This repository serves as a structured learning resource for C programming fundamentals and advanced concepts. Each section includes detailed explanations, practical examples, and exercises to reinforce understanding.
├── 00_index.md # Complete table of contents
├── 01_basics.md # Syntax, variables, and data types
├── 02_pointers.md # Pointers, arrays, and memory management
├── 03_functions.md # Function declarations, definitions, and scope
├── 04_structs.md # Structures and unions
├── 05_file_io.md # File handling and I/O operations
├── 06_preprocessor.md # Macros, conditional compilation, and header files
├── 07_dynamic_memory.md # malloc, calloc, realloc, and free
├── 08_data_structures.md # Linked lists, stacks, queues, and trees
├── 09_algorithms.md # Sorting, searching, and algorithm analysis
├── 10_advanced.md # Bitwise operations, function pointers, variadic functions
└── projects/ # Hands-on demo programs and applications
- Syntax fundamentals – Understanding C program structure
- Variables & Data Types – Integers, floats, chars, and type conversions
- Control Flow – Conditionals (if/else, switch) and loops (for, while, do-while)
- Operators – Arithmetic, logical, relational, and assignment operators
- Pointer Fundamentals – Declaration, dereferencing, and pointer arithmetic
- Arrays – Static and dynamic arrays with pointers
- Memory Management – Stack vs heap, understanding memory layout
- Function Declaration & Definition – Prototypes and implementations
- Parameter Passing – Pass by value vs pass by reference
- Scope & Lifetime – Local, global, and static variables
- Recursion – Recursive functions and stack frames
- Struct Basics – Defining and using structures
- Nested Structures – Structures within structures
- Unions – Memory-efficient data structures
- Typedef – Creating custom type names
- File Operations – fopen, fclose, fread, fwrite
- Text vs Binary Files – Different file handling modes
- Error Handling – Checking file operations for errors
- Command Line Arguments – argc and argv
- Macros – #define and function-like macros
- Conditional Compilation – #ifdef, #ifndef, #if
- Header Files – Creating and using .h files
- Include Guards – Preventing multiple inclusions
- Memory Allocation – malloc, calloc, realloc
- Memory Deallocation – free and avoiding memory leaks
- Memory Debugging – Using tools like valgrind
- Common Pitfalls – Dangling pointers, double free, buffer overflows
- Linked Lists – Singly and doubly linked lists
- Stacks & Queues – LIFO and FIFO implementations
- Trees – Binary trees and binary search trees
- Hash Tables – Hash functions and collision handling
- Sorting – Bubble sort, insertion sort, quicksort, merge sort
- Searching – Linear search, binary search
- Time Complexity – Big O notation and analysis
- Space Complexity – Memory usage considerations
- Bitwise Operations – Bit manipulation and flags
- Function Pointers – Callbacks and function tables
- Variadic Functions – Functions with variable arguments
- Multi-file Projects – Compiling and linking multiple files
Real-world applications demonstrating concepts:
- Simple calculators
- File I/O utilities
- Data structure implementations
- And more...
- GCC compiler or any C compiler
- Text editor or IDE (VS Code, CLion, etc.)
- Basic command line knowledge
# Clone the repository
git clone https://github.com/itachi-re/c-programming-notes.git
# Navigate to project directory
cd c-programming-notes/projects
# Compile and run
gcc example.c -o example
./example- Master C syntax and fundamentals
- Understand memory management and pointers
- Write and debug functions effectively
- Work with structures and custom data types
- Handle file I/O operations
- Implement common data structures
- Master dynamic memory allocation
- Understand and use the preprocessor
- Implement sorting and searching algorithms
- Learn advanced topics (bitwise ops, function pointers)
- Build complete multi-file C projects
Contributions, corrections, and suggestions are welcome! Feel free to:
- Open an issue for discussion
- Submit a pull request with improvements
- Share additional resources
All documentation is written in Markdown for easy reading and portability. The repository is version-controlled with Git to track learning progress over time.
Questions or feedback? Feel free to reach out!
📬 Email: itachi_re@protonmail.com
This project is licensed under the MIT License - see the LICENSE file for details.
⭐ Star this repo if you find it helpful for your C learning journey!