Log In
0% completed
All Lessons
Free Lessons (5)
Introduction
Welcome to Pointers and Memory in Depth
Memory
Pointers
Common Errors
Quiz Yourself on Memory and Pointers
Stack and Local Memory
Local vs. Global Scope
Stack Definition
Stack for Local Variables
Stack for Function Calls
Pointers to Variables on Stack
Common Errors
Quiz Yourself on Stack Usage
Passing Arguments to Functions
Pass by Value
Issues in the Pass by Value
Pass by Reference Using Pointers
Coding Challenge: The Swap Function
Changing the Value of Pointers Passed as Arguments
Quiz Yourself on Parameter Passing
Pointer Arithmetic Basics
Size of Data Types
Addition
Subtraction
Comparing Pointers
Invalid Operations
Quiz Yourself on Pointer Arithmetic
Pointers and Arrays
Array Basics
Pointers and Arrays
Pointer Arithmetic with Arrays
Array Decaying
Passing Arrays to Functions
Practice: Target Sum in a Sorted Array
Challenge: Closest Target Sum in Two Sorted Arrays
Quiz Yourself on Arrays
Pointers and Strings
Memory Representation Using Char Arrays
Pointers to Constant Strings
Pointer Arithmetic With Strings
Returning Pointers to Strings
Practice: Reverse a String
Challenge: Locate the First Occurrence
Quiz Yourself on Strings
Pointers and Functions
Writing Function Pointers
Function Pointers and Regular Pointers
Passing Functions as Arguments
Arrays of Function Pointers
Practice: Build a Command-Line Tool
Quiz Yourself on Function Pointers
Complex Pointer Declarations
Basic Rules
Reading Complex Pointer Declarations
More Details on Reading Complex Declarations
Quiz Yourself on Reading Complex Pointer Declarations
Course Assessment
Assessment 1
Heap and Dynamic Memory
Heap Definition
Dynamic Memory Allocation Functions
Static vs. Dynamic Allocation
Allocating 1-D Arrays on Heap
Reallocating Dynamic Arrays
Introduction to Valgrind
Challenge: std::string in C
Allocating 2-D Arrays on Heap
Allocating a Matrix as a Contiguous Block
Sharing Memory Between Functions and Ownership
Common Errors
Quiz Yourself on Heap and Dynamic Memory Allocations
Structures
Structures Definition
Arrays of Structures
Dynamically Allocating Structures and Structure Members
Padding for Struct Members
Deep and Shallow Copy
Quiz Yourself on Structures
Coding Challenge: Modeling Complex Objects and Relationships (1)
Coding Challenge: Modeling Complex Objects and Relationships (2)
Practicing Everything with Linked Lists
Singly Linked Lists Definition
Practice: Inserting Elements in a Linked List
Challenge: Inserting Elements in a Linked List
Linked Lists vs Arrays from a Memory Point of View
Local References Technique
Practice: Sorted Union
Challenges: Insert at Position and Merge Lists
Course Assessment
Assessment 2
Genericity Using Void Pointers
void Pointers Definition
Examples of Functions Using void*
Generic Linked List
Helper Functions for Genericity
Practice: Get Element at Position
Challenge: Remove Element from Generic Linked List
Quiz Yourself on void Pointers
Advanced Memory Manipulation
Reinterpreting Memory
Challenge: Implement memcmp
Endianness
Challenge: Set Integer Bytes
Checking Endianness
Quiz Yourself on Advanced Memory Manipulation
Project Prep: Binary Search Trees
Binary Search Tree Definition
Implementation Tips and Tricks
Pseudocode Lessons
BST Operations: Pseudocode (Part 1)
BST Operations: Playground (Part 1)
BST Operations: Pseudocode (Part 2)
BST Operations: Playground (Part 2)
BST Operations: Pseudocode (Part 3)
BST Operations: Playground (Part 3)
BST Operations: Pseudocode (Part 4)
BST Operations: Playground (Part 4)
Mini Project
Efficiently Processing Temperature Samples
Mini Project
Efficient Dictionary
Mini Project
Efficiently Processing Employee Records
Conclusion
Conclusion
Appendix 1 - Useful Links and Tools
Appendix 2 - Generic BST Implementation Solution
Appendix 3 - Temperature Samples Project Solution
Appendix 4 - Dictionary Project Solution
Appendix 5 - Employee Records Project Solution
An In-Depth Understanding of Memory and Pointers in C
/
...
/
Appendix 1 - Useful Links and Tools
Appendix 1 - Useful Links and Tools
We'll cover the following...
Valgrind resources:
Binary to decimal converter
Valgrind resources:
Below are some
...