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

If fp is a function pointer, are fp(5) and (fp)(5) different?

If fp is a function pointer, are fp(5) and (*fp)(5) different?

  1. A.Yes, fp(5) calls the pointer and (*fp)(5) calls the function
  2. B.No, both call the function that fp points to
  3. C.fp(5) is a compile error
  4. D.(*fp)(5) is a compile error
Answer & explanation

Correct answer: No, both call the function that fp points to

C allows both forms; the shorter fp(5) is more common.

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 →