CHAPTER 7

image

Function Pointers

Many times we come across situations where we have multiple functions that do specific jobs.  Then, based on a particular situation, we need to call the proper function from that group. In this chapter, we will see how function pointers help us tackle those situations. Function pointers are variables that are used for pointing to the address of a function. With the help of a function pointer, we can invoke a function call. Interestingly, we can use the function pointers to implement late binding, where we don’t know which particular function call to make beforehand.

Defining Function Pointers

As discussed in Chapter ...

Get Pointers in C: A Hands on Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.