C/C++ reference: http://www.cppreference.com/

Laboratory 9: Review of Assignment#2 Solution and Practice with function Pointers

        For assignment-3, you need to pass a pointer to a hash function to another method.
        In this lab, you will learn how to use pointers to functions,
        and how to pass them as parameters to other functions.

        You also need to understand the code from the Assignment#2 solution,
        which is going to be re-used for Assignment#3.
 
 

Topics to be explained by your TA:

SOLUTION


YOUR TASK


Task: According to user input, perform the specified operation on the two arrays, and display the result

IMPORTANT:

Difference between a "Pointer to function" and a "function returning a pointer"

/* function returning pointer to int */
int *func(int a, float b);

/* pointer to function returning int */
int (*func)(int a, float b);

The difference between the above two declarations is only in the paraentheses.

So, be very careful about placing the parentheses in the right place.