Skip to main content
C Code Completion Hard +35 XP

Function Pointer

Complete the function pointer declaration.

CFill in the blank
int (*___)(int, int) = &add;

Type the missing code

Show answer and explanation

Answer: fp

Function pointer syntax: returnType (*name)(params). Here fp points to a function taking two ints and returning int.

Hint: The name goes inside the parentheses after *.

What this challenge tests

Code Completion in C: function-pointers, advanced.

Related challenges