While function pointers are important. I don’t think they’re quite as important as pointers. C would just not be C without pointers. There are so many things that you would not be able to do if the language lacked pointers. Things like most data structures (try doing a linked list without pointers!) .
However function pointers give additional flexibility. You can pass them as parameters in functions and store them in variables.
These are the earlier tutorials on pointers:
- A look at pointers. Intro to pointers
- Pointers and c-strings. A string in C is actually a pointer to a block of characters terminated by a 0.
- Pointers and linked lists. A way of storing data in a variable size structure.
And this is the new one:
- A look at function pointers. How to deine and use them,
(Visited 31 times, 1 visits today)