C Programming Fundamentals: Pointers, Memory and Files

Learn C from syntax and control flow to pointers, structs, dynamic memory and file handling. For students and aspiring systems programmers.

Start course →

What you'll learn

  • Compile and run C programs and use variables, types and control flow.
  • Write functions, arrays and strings and handle input safely.
  • Use pointers, pointer arithmetic and function pointers confidently.
  • Model data with structs, unions and enums and manage heap memory without leaks.
  • Read and write files, use the preprocessor and debug with gdb and sanitizers.

Syllabus

Module 1: Getting Started

  1. C Introduction
  2. Environment Setup
  3. Hello, World!

Module 2: Basics

  1. C Syntax
  2. Variables
  3. Data Types
  4. Operators

Module 3: Control Flow

  1. If ... Else
  2. Loops

Module 4: Functions

  1. Function Basics
  2. Parameters & Return Values
  3. Function Prototypes
  4. Recursion
  5. Scope & Storage
  6. Function Pointers & Callbacks

Module 5: Arrays & Strings

  1. Arrays
  2. Strings
  3. string.h Functions
  4. Reading String Input

Module 6: Pointers

  1. Pointer Basics
  2. Pointer Arithmetic
  3. Pointers & Arrays
  4. Pointers & Functions
  5. Pointer to Pointer & NULL

Module 7: Structures & Unions

  1. Structures
  2. Arrays of Structures
  3. typedef
  4. Unions & Enums

Module 8: Dynamic Memory

  1. malloc, calloc, realloc, free
  2. Memory Leaks & Dangling Pointers

Module 9: File Handling

  1. Opening & Closing Files
  2. Reading & Writing Files

Module 10: Preprocessor & Compilation

  1. Macros & Conditional Compilation
  2. Headers, Multi-File Programs & Compilation

Module 11: Bit Manipulation

  1. Bitwise Operators & Bit Flags

Module 12: Common Pitfalls & Best Practices

  1. Undefined Behavior & const
  2. Debugging Basics
  3. Memory Debugging: ASan & Valgrind