🎙 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 1 of 15

What does int (fp)(double); declare?

What does int (*fp)(double); declare?

  1. A.A function fp that returns an int pointer
  2. B.A pointer to a function that takes a double and returns an int
  3. C.An array of int pointers
  4. D.A pointer to a double
Answer & explanation

Correct answer: A pointer to a function that takes a double and returns an int

The brackets make fp a pointer; what it points to is a function (double) returning int.

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 →