

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Memory
incomplete
2: What Is an Address?
incomplete
3: Virtual Memory
incomplete
4: Pointers
incomplete
5: Why Pointers?
incomplete
6: Pointer Basics
incomplete
7: Pointers to Structs
incomplete
8: C Arrays
incomplete
9: Arrays As Pointers in C
incomplete
10: Multibyte Arrays
incomplete
11: Array Casting
incomplete
12: Pointer Size
incomplete
13: Arrays Decay to Pointers
incomplete
14: C Strings
incomplete
15: C String Library
incomplete
16: Forward Declaration
incomplete
17: Mutual Structs
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
As it turns out, your code probably doesn't have direct access to the physical RAM in your computer.
Instead, your operating system provides a layer of abstraction called virtual memory. Virtual memory makes it seem like your program has direct access to all the memory on the machine, even if it doesn't.
process and is given access to a chunk of virtual memory by the operating system.There are exceptions to this, for example if you're using C to build embedded firmware that runs without an operating system, your code might interact directly with physical memory.
By only giving processes access to a chunk of virtual memory, the operating system can do some cool things:
At the end of the day, your program has direct access to a virtual chunk of memory. Just like physical memory, it can be thought of as a big array of bytes, where each byte has an address.