🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.A pointer to a function returning int
  2. B.A function named f that takes an int and returns an int pointer
  3. C.An int pointer named f, set to an int
  4. 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 →