All languages

C

You're viewing a free preview. Sign in free to read every script.

Why this exists A pointer is just a variable that holds a memory address. Everything difficult about C comes down to who owns a piece of memory, how long it lives, and whether a pointer still refers to something valid.…

C Basics: Pointers and Memory

What a pointer is, how to take an address and follow it, pointer arithmetic on arrays, allocating memory with malloc, checking for failure, freeing it, and the three classic mistakes: leaks, use after free and returning a pointer to a local variable.

Sign in free to read this script, along with the rest of the library.

Sign in free