Advanced C Programming: Pointers
4.6 (139 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,184 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Advanced C Programming: Pointers to your Wishlist.

Add to Wishlist

Advanced C Programming: Pointers

Master pointers, addresses and memory allocation in C
4.6 (139 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,184 students enrolled
Created by Huw Collingbourne
Last updated 8/2017
Current price: $10 Original price: $95 Discount: 89% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 3.5 hours on-demand video
  • 3 Articles
  • 3 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Pointers and addresses
  • Indirection and multiple indirection
  • Generic pointers and casts
  • Memory allocation and reallocation
  • Pointer arithmetic
  • Singly and doubly linked lists
  • Queues and stacks
  • Deep and shallow copying
  • Common pointer errors
View Curriculum
  • You should understand at least the basics of C programming

To be an expert C programmer you need to master the use of pointers. This course explains pointers in real depth. It explains pointer variables, pointer arithmetic, indirection, memory allocation, how to create and maintain linked lists and how to use function pointers. In fact, by the time you finish this course, you will know pointers inside out. You will understand what they are, how they work and how to make sure that they don’t make your programs crash!

This is not a course for beginners. It is aimed at programmers who already have a good working knowledge of C programming and who need to take the next step in mastering C by gaining a deep understanding of pointers.

If you’ve struggled with pointers  and can’t quite figure out what all those ‘arrow diagrams’ really mean or what exactly is the relationship between pointers and addresses, this is the course for you. In a series of short, tightly-targeted lessons, you will learn all about: 

  • computer memory and how pointers access it
  • how memory is allocated 
  • why copying data using pointers can cause program errors
  • why some pointers are ‘generic’ 
  • what happens when you ‘cast’ pointers to specific types
  • how to create singly and doubly linked lists
  • how to use stacks and queues
  • how to avoid memory leaks and other common problems
  • ...and much more.

The source code for all the example programs is provided, so if you need to try out my code you can load it and run it in your preferred C IDE or code editor.

Who is the target audience?
  • Any C programmer who needs to understand pointers in depth
Compare to Other C Courses
Curriculum For This Course
59 Lectures
Pointer Basics
7 Lectures 14:49

Who this course is for and what you will get out of it.

Preview 02:44

What is in the course and how should you study it?

Preview 03:14

Course Notes and FAQ

Source Code Archive

Pointers and addresses - how are they related?

What is a pointer?

How to create and use a pointer variable in C.

Pointer variables

Dereferencing to get at the data that is ‘pointed to’.


What are pointers?

Pointer Basics
4 questions
Addresses and Indirection
20 Lectures 01:25:42

The address of the array is the same as the address of the first item in the array. Why is that important?

Preview 03:46

How can pointer values be displayed?

How to display pointer values

Let’s see how pointers and addresses work – and why arrays are special.

Preview 05:50

Pointers to pointers

Multiple indirection

Pointers to pointers to integers

Multiple indirection with integers

Arrays of arrays of characters

Multiple Indirection with strings

What is **argv in the main() function?

Indirection and commandline args

Pointers to void

Generic Pointers

Setting aside storage space

Allocating memory

How to allocate the right amount of memory for a specific amount of data

Malloc and sizeof

Why does your C compiler will complain about some functions?

Functions that cause errors or warnings

How to clear memory before allocating


How to free memory that is no longer needed 


How to change the size of a block of allocated memory


What does it mean when you add 1 to a pointer?

Pointer arithmetic

Using pointer arithmetic with arrays

Calculating an array index

But how much memory does a struct need?

Pointers to structs

Why the order of fields in a struct is important

Data type alignment

Understanding that data types of a certain size are aligned on boundaries of that size

Type alignment on boundaries

Pointer arithmetic works with complex types as well as simple types

Type alignment and pointer arithmetic

The relationship between pointers, addresses and data stored in memory

Addresses and Indirection
4 questions
Lists and data structures
20 Lectures 01:10:52

Limitations of arrays and using linked lists as an alternative

Arrays and Lists

How is a linked list different from an array?

What is a linked list?

Lists that include one pointer linking each element to the next one

Singly linked lists

Do you really always need to free memory?

To free or not to free?

Lists whose elements contain pointers to each adjacent element

Doubly linked lists

An example showing how to create a simple double-linked list

Programming a doubly-linked List

Initializing a doubly-linked list not quite as simple as initializing a singly-linked list

Initializing a doubly-linked list

A sample project showing a doubly-linked list

Implementing a doubly linked list

Queues are very common data structures in programming – here I explain what they are

What is a queue?

Using a doubly linked list as a queue


A stack is another important type of data structure – here we see how it differs from a queue

What is a stack?

You may need pointers with a stack, but you may not need a linked list


Adding and removing items to and from a stack

Pushing and popping

Iterating over list elements

Calculating the length of list

Making a new copy of an existing queue

Copying a list

How would you delete an item from the middle of a list?

Removing an element from within a list

How would you add an item into a list?

Adding an element into a list

What is a function pointer and what are they for?

Function pointers

The strange syntax for declaring a function pointer

Function pointer declarations

How a single piece of code can call different functions using function pointers

An array of function pointers

Pointers in linked lists, queues and stacks 

Lists and Data Structures
4 questions
Common Pointer Problems
12 Lectures 39:29

Pointers are one of the major sources of error in C programs. But why?

Why do pointers cause problems?

When is a copy not a copy?

Deep and shallow copies

Sometimes a copy may not be what you think it is!

A deeper look at deep and shallow copies

Allocating the wrong amount of memory is a recipe for disaster

Incorrect memory allocation

When you cast a pointer you are not really changing anything. But an incorrect cast can cause problems even so

Casting pointers

An example of a cast that didn’t work as expected

Incorrect casts

What happens if you free some memory twice?

Freeing already freed memory

When memory is allocated but not freed

Memory leaks

What happens when you try to use memory that has already been freed?

Using freed memory

Trying to access things that can’t be accessed

Pointers out of scope

What happens if you use a pointer that doesn’t point to anything?

Dereferencing a null pointer

Some common sources of error in C programs.

Common pointer problems
4 questions

That’s it! So where to next? Here are a few pointers…

And finally...
About the Instructor
Huw Collingbourne
4.3 Average rating
3,243 Reviews
54,939 Students
12 Courses
Director of Technology, SapphireSteel Software

Huw Collingbourne is the technology director at SapphireSteel Software, developers of programming tools for Microsoft Visual Studio. He is author of The Book Of Ruby from No Starch Press. He runs Bitwise Courses and teaches courses on a range of programming topics.

Huw has been a programmer for more than 30 years. He is a well-known technology writer in the UK. For over ten years he wrote the Delphi and Java programming column for PC Plus Magazine. He has also written numerous opinion and programming columns (including tutorials on C#, C++, Smalltalk and Ruby) for a number of computer magazines, such as Computer Shopper, PC Pro, and PC Plus

In the 1980s he was a pop music journalist and interviewed most of the New Romantic stars, such as Duran Duran, Spandau Ballet, Adam Ant, Boy George, and Depeche Mode. He is now writing a series of New Romantic murder mysteries.

At various times Huw has been a magazine publisher, editor, and TV broadcaster. He has an MA in English from the University of Cambridge and holds a 2nd dan black belt in aikido, a martial art which he teaches in North Devon, UK. The aikido comes in useful when trying (usually unsuccessfully) to keep his Pyrenean Mountain Dogs under some semblance of control.