Pointers & References

Work with memory directly. Learn how pointers store addresses, how references create aliases, and when to use each for efficient parameter passing.

52 lessons
201 min

Lessons

1. Intro

Memory addresses and aliases

4m

2. Memory Addresses

Understanding memory locations

4m

3. The Address-of Operator

Using & to find addresses

4m

4. What is a Pointer?

Variables that store addresses

4m

5. Quiz: Pointer Basics

Pointer syntax

2m1 problems

6. Pointer Declaration

Creating pointer variables

4m

7. Dereferencing Pointers

Using * to get values

4m

8. Quiz: Pointer Operations

Predict the output

3m1 problems

9. Pointer Initialization

Using nullptr

4m

10. Pointers and Arrays

Array names as addresses

4m

11. Pointer Arithmetic

Adding to pointers

4m

12. Quiz: Pointer Arithmetic

Understanding movement

3m1 problems

13. What is a Reference?

Aliases for variables

4m

14. Reference Declaration

Variable aliases

4m

15. Quiz: Variable alias

Variable alias

3m1 problems

16. References vs Pointers

Key differences

4m

17. Quiz: References

Understanding aliases

3m1 problems

18. Pass by Reference

Function parameter technique

4m

19. Const References

Avoiding copies safely

4m

20. Quiz: Variable alias

Variable alias

3m1 problems

21. When to Use Pointers vs References

Choosing the right tool

4m

22. Quiz: Pass by Reference

Function parameter behavior

3m1 problems

23. Common Pointer Errors

Avoid common crashes

4m

24. Memory Safety Basics

Safe pointer habits

4m

25. Problem: Swap Two Numbers

Writing swap function

4m1 problems

26. Quiz: Swap Implementation

Verify your approach

3m1 problems

27. Problem: Sum Array Elements

Using pointer arithmetic

4m1 problems

28. Problem: Find Maximum

Combining techniques

4m1 problems

29. Quiz: Pointer Traversal

Avoiding errors

3m1 problems

30. Problem: Modify via Pointer

Dereferencing practice

4m1 problems

31. Problem: Count References

Multiple names scenario

4m1 problems

32. Quiz: Reference Behavior

Predicting results

3m1 problems

33. Problem: Safe Pointer Check

Preventing crashes

4m1 problems

34. Problem: Array Reversal

Using two pointers

4m1 problems

35. Quiz: Array Reversal

Understanding the algorithm

3m1 problems

36. Problem: Reference Parameters

Computing several values

4m1 problems

37. Problem: Const Correctness

Using const references

4m1 problems

38. Quiz: Const References

Understanding restrictions

3m1 problems

39. Problem - Presents

Tracking gift exchanges

4m1 problems

40. Presents - The Idea

Inverting the mapping

5m

41. Presents - Algorithm

Breaking down the solution

4m

42. Presents - Implementation

Complete solution

5m1 problems

43. Presents - Walkthrough

Following the execution

4m

44. Lessons from Presents

summary

4m

45. Quiz: Integer type

Integer type

3m1 problems

46. Problem - Beautiful Matrix

Finding position in grid

4m1 problems

47. Beautiful Matrix - The Idea

Counting steps in grid

5m

48. Beautiful Matrix - Algorithm

Breaking down the solution

5m

49. Quiz: Conditional execution

Conditional execution

3m1 problems

50. Beautiful Matrix - Implementation

Complete solution

7m1 problems

51. Lessons from Beautiful Matrix

summary

4m

52. Section Recap

What we learned

5m

Ready to start learning?

Access all 52 lessons with interactive content and progress tracking.