C Programming Tutorials
In this tutorial, you will learn about C Programming Tutorials. We cover key concepts, practical examples, and best practices to help you master this topic.
C is a procedural systems programming language that gives you direct control over memory through pointers and manual allocation, forming the foundation of operating systems, embedded firmware, and high-performance computing. This comprehensive tutorial series covers everything from basic syntax to advanced system programming.
Learning Path
flowchart LR A[Fundamentals
01-10] --> B[Pointers & Memory
11-20] B --> C[Functions & Scope
21-28] C --> D[Preprocessor & Build
29-34] D --> E[Advanced C
35-42] E --> F[Projects
43-50] style A fill:#f90,color:#fff
Modules
Module 1: C Fundamentals (01-10)
What Is C, Installing Compiler, Hello World, Variables, Constants, Operators, Control Flow, Loops, Arrays, Strings
Module 2: Pointers & Memory (11-20)
Pointers Basics, Pointer Arithmetic, Functions & Pointers, Dynamic Memory, Memory Layout, Structs, Unions, Bit Fields, Typedef, Void Pointers
Module 3: Functions & Scope (21-28)
Functions, Scope & Linkage, Recursion, Variable Arguments, Inline Functions, Function Pointers, Setjmp/Longjmp, Assert
Module 4: Preprocessor & Build (29-34)
Preprocessor, Header Files, Makefiles, Multiple Files, Libraries, CMake
Module 5: Advanced C (35-42)
File I/O, Stdlib, String Handling, Error Handling, Signals, Multithreading, Network Sockets, I/O Multiplexing
Module 6: Projects & Ecosystem (43-50)
Calculator, File Splitter, Linked List, Hash Table, HTTP Client, Chat Server, Mini Shell, C Ecosystem
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro.
Published Topics
What Is C Programming? History, Use Cases, and Standards Explained
Learn what C programming is, its history from Bell Labs, systems programming use cases, and the evolution of ANSI, C99, C11, and C23 standards.
✓ LiveInstalling a C Compiler — GCC, Clang, Make, and Your First Program
Learn how to install a C compiler on Windows, macOS, and Linux including GCC, Clang, and Make, then compile and run your first C program step by step.
✓ LiveHello World in C — Anatomy of a C Program and Compilation
Learn how to write, compile, and run a Hello World program in C, understand stdio.h, the main function, printf syntax, and the four stages of compilation.
✓ LiveC Variables — Data Types, Declarations, and Memory Size Explained
Learn C variables: int, char, float, double, unsigned types, variable declarations, initialization, sizeof operator, and how data is stored in memory.
✓ LiveCLR (Common Language Runtime) — Explained with Examples
The Common Language Runtime (CLR) is the virtual machine component of .NET that manages execution of CIL bytecode with services like JIT and garbage collection.
✓ LiveC Constants — #define, const, enum, and Literal Suffixes Explained
Learn how to define and use constants in C using #define preprocessor macros, const qualifiers, enum types, and literal suffixes for type-safe values.
✓ LiveC Operators — Arithmetic, Relational, Logical, Bitwise, and Assignment
Learn C operators: arithmetic operators for math, relational operators for comparison, logical operators for Boolean logic, bitwise operators for manipulation, and assignment.
✓ LiveC Control Flow — If/Else, Switch, and Conditional Expressions Explained
Learn C control flow: if/else statements for branching, switch statements for multi-way selection, and conditional expressions for inline decisions in your C programs.
✓ LiveC Loops — For, While, Do-While, Break, Continue, and Goto
Learn C loops: for loops with counter control, while loops with condition-first checking, do-while loops with post-condition, and loop control using break, continue, and goto.
✓ LiveC Arrays — Declaration, Initialization, and Multi-Dimensional Arrays
Learn C arrays: declaring and initializing single-dimensional arrays, accessing elements, multi-dimensional arrays, array boundaries, and common array operations.
✓ LiveC Strings — Char Arrays, Null Terminator, and string.h Functions
Learn C strings: character arrays with null terminators, string literals, string.h functions for copying, concatenation, comparison, and safe string handling.
✓ LiveCompiled vs Interpreted Languages — Explained with Examples
Compiled languages translate source code to machine code before execution, while interpreted languages execute code line-by-line through an interpreter at runtime.
✓ LiveC Pointers — Address-of Operator, Dereferencing, Pointer Types, and NULL
Learn C pointers: the address-of operator (&), dereferencing (*), pointer types and their sizes, NULL pointers, and how pointers connect to memory addresses.
✓ LiveC Pointer Arithmetic — Increment, Decrement, Array Traversal, and Pointer Difference
Learn C pointer arithmetic: incrementing and decrementing pointers, traversing arrays with pointers, computing pointer differences, and how pointer types affect arithmetic.
✓ LiveC Functions and Pointers — Pass by Value, Pointer Parameters, and Function Pointers
Learn C functions with pointers: pass by value semantics, using pointer parameters for output, function pointers for callbacks, and array parameters in functions.
✓ LiveC Dynamic Memory — Malloc, Calloc, Realloc, and Free Explained
Learn C dynamic memory allocation: malloc for allocation, calloc for zero-initialized memory, realloc for resizing, and free for deallocation with best practices.
✓ LiveC++ Tutorials — Complete Beginner to Advanced Guide
Learn C++ step by step from C basics to modern C++23. 70 lessons covering pointers, OOP, STL, templates, RAII, and systems programming.
✓ LiveC Memory Layout — Stack, Heap, Data Segment, and Text Segment
Learn C memory layout: the stack for local variables and function calls, the heap for dynamic allocation, the data segment for globals and statics, and the text segment for code.
✓ LiveC# Tutorials — Complete Beginner to Advanced Guide
Learn C# step by step from fundamentals to ASP.NET Core. 60 lessons covering .NET ecosystem, OOP, modern C# features, and real-world project development.
✓ LiveC Structs — Structure Definition, Nesting, Typedef, and Padding
Learn C structs: defining structures, accessing members, nested structs, typedef for type aliases, structure padding, and passing structs to functions.
✓ LiveC Unions — Shared Memory, Type Punning, and Union vs Struct
Learn C unions: how unions share memory between different types, type punning for data interpretation, union vs struct differences, and practical use cases for unions.
✓ LiveC Bit Fields — Packed Data, Bit-Level Struct Members, and Flags
Learn C bit fields: defining struct members with specific bit widths, packed data structures, flag combinations, and bit field portability considerations.
✓ LiveC Typedef — Type Aliases, Struct Typedef, and Function Pointer Typedefs
Learn C typedef: creating type aliases for primitive types, simplifying struct declarations, typedef for function pointers, and improving code readability with typedef.
✓ LiveC Void Pointers — Complete Guide
C void pointers (void*) are generic pointers that can point to any data type, enabling type-agnostic functions like qsort and bsearch that work with.
✓ LiveC Functions — Complete Guide
C functions are reusable blocks of code that perform specific tasks. Every C program has at least one function (main), and functions are the primary.
✓ LiveC Scope and Linkage — Complete Guide
C scope and linkage determine where variables are visible in your program. Scope refers to the region where a variable can be accessed. Linkage controls.
✓ LiveC Recursion — Recursive Functions Explained with Examples
Learn recursion in C: recursive functions, base cases, stack frames, tail recursion vs iteration, and practical examples like factorial, Fibonacci, and tree traversal.
✓ LiveC Variable Arguments — Variadic Functions with stdarg.h Explained
Learn C variable arguments: variadic functions using stdarg.h, va_list, va_start, va_arg, va_end. Complete guide with printf-style examples and type safety.
✓ LiveC Inline Functions — Inline Expansion, Optimization, and Best Practices
Learn C inline functions: inline keyword, compiler optimization, macro vs inline comparison, static inline patterns, and when to use inline for performance.
✓ LiveCrystal Tutorials
Crystal is a compiled language with Ruby-like syntax, type inference, and native performance through LLVM. It's ideal for web applications and systems.
✓ LiveC Function Pointers — Callbacks, Dispatch Tables, and Dynamic Calls
Learn C function pointers: declaring, assigning, and calling functions through pointers. Callbacks, dispatch tables, qsort, and signal handlers with examples.
✓ LiveC setjmp and longjmp — Non-Local Jumps for Error Recovery
Learn C setjmp and longjmp: non-local jumps for deep error recovery, saving and restoring execution context, and implementing coroutine-like patterns.
✓ LiveC Assertions — Runtime Debugging with assert.h and Static Assertions
Learn C assertions: assert macros for runtime debugging, static_assert for compile-time checks, enabling/disabling assertions in debug vs release builds, and custom assertion handlers.
✓ LiveC Preprocessor — Macros, Includes, and Conditional Compilation
Learn the C preprocessor: #define macros, #include directives, conditional compilation with #ifdef/#ifndef, #pragma, #error, and the ## token pasting operator for metaprogramming.
✓ LiveClojure Tutorials — Complete Beginner to Advanced Guide
Learn Clojure step by step from REPL to web apps. 30 lessons covering sequences, macros, concurrency, protocols, and ClojureScript.
✓ LiveC Header Files — Declaration, Inclusion, and Organization
Learn C header files: declaring functions and variables with extern, defining structures and types, include guards, forward declarations, and best practices for organizing multi-file projects.
✓ LiveC Makefiles — Build Automation with GNU Make
Learn C Makefiles: writing Makefile rules with targets and dependencies, using variables and automatic variables, pattern rules for compilation, and phony targets for clean and all.
✓ LiveC Multiple Files — Multi-Translation-Unit Programs and Linkage
Learn C multi-file programming: splitting code across source files, internal and external linkage with static and extern, translation units, the linker's role, and avoiding duplicate symbol errors.
✓ LiveC Libraries — Static and Dynamic Library Creation and Linking
Learn C libraries: creating static libraries (.a) with ar, building shared libraries (.so) with -shared -fPIC, linking libraries at compile and runtime, and the differences between static, dynamic, and dynamic-loading approaches.
✓ LiveC CMake — Cross-Platform Build System Configuration
Learn CMake for C projects: CMakeLists.txt syntax, targets with add_executable and add_library, finding packages with find_package, and configuring builds with generator expressions and CMake Presets.
✓ LiveC File I/O — Reading and Writing Files with stdio
Learn C file I/O: opening files with fopen, reading with fgets/fread/fscanf, writing with fprintf/fwrite, file positioning with fseek/ftell, and error handling for robust file operations.
✓ LiveC Standard Library — Essential Functions in libc (stdlib, math, time, locale)
Learn the C standard library: memory allocation (malloc/calloc/realloc/free), random numbers (rand/srand), integer arithmetic (abs/div), searching and sorting (qsort/bsearch), math functions, time functions, and locale handling.
✓ LiveC String Handling — String Manipulation with string.h
Learn C string handling: strlen for length, strcpy/strncpy for copying, strcat/strncat for concatenation, strcmp/strncmp for comparison, strstr/strchr for searching, and tokening with strtok.
✓ LiveC Error Handling — errno, perror, strerror, and Robust Patterns
Learn C error handling: using errno for system call errors, perror and strerror for error messages, return codes for function errors, and goto cleanup patterns for resource management in robust C programs.
✓ LiveC Signals — Handling Operating System Interrupts with signal() and sigaction()
Learn C signal handling: catching SIGINT, SIGTERM, SIGSEGV with signal() and sigaction(), writing safe signal handlers, and blocking signals with sigprocmask.
✓ LiveC Multithreading — POSIX Threads (pthreads) for Concurrent Programming
Learn C multithreading with POSIX threads: creating and joining threads, mutexes for synchronization, condition variables, thread-local storage, and thread-safe programming patterns.
✓ LiveC Network Sockets — TCP/IP Socket Programming with Berkeley Sockets
Learn C network socket programming: socket(), bind(), listen(), accept(), connect() for TCP client-server communication, with IPv4 and IPv6 support and error handling.
✓ LiveC I/O Multiplexing — Complete Guide
In this tutorial, you will learn about i/o multiplexing in C programming. This concept is essential for building robust and efficient C programs.
✓ LiveC I/O Multiplexing — select, poll, and epoll for Concurrent I/O
Learn C I/O multiplexing with select, poll, and epoll to monitor multiple file descriptors simultaneously, enabling single-threaded event-driven servers to handle thousands of connections.
✓ LiveC Project Calculator — Complete Guide
In this tutorial, you will learn about project calculator in C programming. This concept is essential for building robust and efficient C programs.
✓ LiveC Project File Splitter — Complete Guide
In this tutorial, you will learn about project file splitter in C programming. This concept is essential for building robust and efficient C programs.
✓ LiveC Project Linked List — Complete Guide
In this tutorial, you will learn about project linked list in C programming. This concept is essential for building robust and efficient C programs.
✓ LiveC Project Hash Table — Complete Guide
In this tutorial, you will learn about project hash table in C programming. This concept is essential for building robust and efficient C programs.
✓ LiveC Project HTTP Client — Complete Guide
In this tutorial, you will learn about project http client in C programming. This concept is essential for building robust and efficient C programs.
✓ LiveC Project Chat Server — Complete Guide
In this tutorial, you will learn about project chat server in C programming. This concept is essential for building robust and efficient C programs.
✓ LiveC Project Mini Shell — Complete Guide
In this tutorial, you will learn about project mini shell in C programming. This concept is essential for building robust and efficient C programs.
✓ LiveC C Ecosystem — Complete Guide
In this tutorial, you will learn about c ecosystem in C programming. This concept is essential for building robust and efficient C programs.
✓ LiveC++ Unique Pointer — Complete Guide
Learn C++ unique_ptr for exclusive ownership of dynamically allocated objects, automatically deleting the resource when the pointer goes out of scope.
✓ LiveC++ Shared Pointer — Complete Guide
Learn C++ shared_ptr for shared ownership using reference counting, automatically deallocating the managed object when the last shared_ptr is destroyed.
✓ LiveC++ Move Semantics — Complete Guide
Learn C++ move semantics and std::move for transferring resources without copying, eliminating unnecessary allocations when passing temporary objects.
✓ LiveC++ constexpr If — Complete Guide
Learn C++ constexpr if for compile-time conditional compilation that discards dead branches, reducing binary size and enabling cleaner template metaprogramming.
✓ LiveC++ Variant and Visitor — Complete Guide
Learn C++ std::variant and std::visit for type-safe unions that hold one of several types, with visitor patterns replacing manual switch-based dispatch.
✓ LiveC++ Fold Expression — Complete Guide
Learn C++ fold expressions that reduce parameter packs over binary operators, enabling concise variadic template operations without recursive instantiation.
✓ LiveC++ Concepts and Requires — Complete Guide
Learn C++ concepts and requires clauses for constraining template parameters with predicates, producing clearer error messages and better overload resolution.
✓ LiveProgramming Paradigms Overview
Learn the main programming paradigms including imperative, functional, object-oriented, and declarative approaches and when to apply each for effective design.
✓ LiveProgramming Language Learning Roadmap — Complete Guide
Learn to build a structured programming language roadmap starting with fundamentals and progressing to advanced concepts across several language families.
✓ LiveOpen Source Contribution Guide
Learn how to contribute to open source projects from finding beginner issues to submitting pull requests and collaborating effectively with maintainers.
✓ LiveCode Review Best Practices
Learn code review best practices for giving constructive feedback, catching bugs early, and building a collaborative engineering culture within your dev team.
✓ LiveTechnical Debt Management — Complete Guide
Learn technical debt management strategies for identifying, prioritizing, and refactoring code while balancing features against long-term maintainability goals.
✓ LiveAlgorithmic Thinking Skills — Complete Guide
Learn algorithmic thinking to break down complex problems, design efficient solutions, and communicate your reasoning clearly during technical interview prep.
✓ LiveAll 70 topics in C Programming Tutorials are published.