Files
developer-roadmap/roadmaps/c/content/function-pointers--callbacks@yAnN3Fk_S3Nx2USXSR-vq.md
Arik Chakma 274082fd77 feat: clean roadmap content and sync scripts (#10181)
* refactor: clean to roadmap content

* refactor: move shared helpers into scripts/lib
2026-07-28 05:45:17 +06:00

927 B

Function pointers & Callbacks

A function pointer stores the address of a function, allowing that function to be called indirectly, passed as an argument, or stored in a data structure, similar to how a regular pointer stores the address of a variable. Callbacks use this to let one function invoke another that is decided at runtime, a pattern used by standard library functions like qsort, which takes a comparison function as a callback. This mechanism underlies more advanced patterns in C, including simulating object-oriented dispatch through structs containing function pointers.

Visit the following resources to learn more: