I'm following Learn C The Hard Way online.
At a point the author talks about "dynamic callback" to a function.
Could someone explain me what it is exactly because I didn't get it?
EDIT
For context, here's an extract from Learn C the Hard Way:
Practical Pointer Usage
There are primarily four useful things you can do with pointers in C code:
• Ask the OS for a chunk of memory and use a pointer to work with it. This includes strings and something you haven’t seen yet,
structs
.
• Pass large blocks of memory (like large structs) to functions with a pointer, so you don’t have to pass the whole thing to them.
• Take the address of a function so you can use it as a dynamic callback.
• Scan complex chunks of memory, converting bytes off of a network socket into data structures or parsing files.
For nearly everything else, you might see people use pointers when they should be using arrays. In the early days of C programming, people used pointers to speed up their programs, because the compilers were really bad at optimizing array usage. These days, the syntax to access an array versus a pointer are translated into the same machine code and optimized in the same way, so it’s not as necessary. Instead, you should go with arrays whenever you can, and then only use pointers as a performance optimization if you absolutely have to.
Excerpt From: Zed A. Shaw. “Learn C the Hard Way: Practical Exercises on the Computational Subjects You Keep Avoiding (Like C) (Brianne Kwasny's Library).”