← Quiz: Function Pointers in C: all 15 questions
Quiz: Function Pointers in C · Question 3 of 15
What does int f(int); declare?
What does int *f(int); declare?
- A.A pointer to a function returning int
- B.A function named f that takes an int and returns an int pointer
- C.An int pointer named f, set to an int
- D.It is a syntax error
Answer & explanation
Correct answer: A function named f that takes an int and returns an int pointer
Without brackets around *f, the () binds first, so f is a function; * belongs to the return type.
Can you get the rest right without peeking?
Take the timed Quiz: Function Pointers in C quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →