Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Learn about pointers
·
Module 6
Function Pointers and Callbacks
1
Declaring Function Pointer Variables
Declare function pointer variables with the correct syntax.
2
Function Pointers: Assignment & Invocation
Assign function addresses to function pointers and invoke functions through them.
3
Simplifying Function Pointers with `typedef`
Use typedef to simplify function pointer declarations and improve code readability.
4
Implementing Callbacks with Function Pointers
Pass function pointers as arguments to other functions to implement callback mechanisms.
Custom Comparison Sorting with Function Pointers
Implement a generic sorting function that accepts a custom comparison function via a function pointer.
6
Event-Driven API Design with Callbacks
Design a simple event-driven API with callback registration and triggering.
7
Passing Context Data with Void Pointers
Pass context-specific data to a callback function using a void pointer.
8
Jump Tables with Function Pointer Arrays
Create and use arrays of function pointers to implement jump tables for efficient dispatching.
9
Implementing Strategy with Function Pointers in C
Apply function pointers to implement the Strategy design pattern in C.
10
Function Pointers for Plugin Architecture
Design a simple plugin architecture using function pointers.
Previous module
Complex Pointer Types and Multi-Level Indirection
Next module
Type Qualifiers and Const Correctness