Passing Pointers to Functions

After arrays and structs, we'll see that pointers works with functions two. Another very important concept dealt with in this lesson is that of passing function arguments by reference, which allows us to alter variable outside the function scope.

Pointers to Functions

One of the handy things you can do in C, is to use a pointer to point to a function. Then you can pass this function pointer to other functions as an argument, you can store it in a struct, etc. Here is a small example:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy