Example 98: Function Pointers

Learn how to create an array of function pointers and call functions using them.

We'll cover the following

Problem

Create an array of four function pointers. Each pointer should point to a different function. Each of these functions should receive two integers and return a float variable. Using a loop, call each of these functions using the addresses present in the array.

Try it yourself

Try to solve this question on your own in the code widget below. If you get stuck, you can always refer to the solution provided.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.