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

What happens if you call a function pointer that is NULL?

What happens if you call a function pointer that is NULL?

  1. A.Nothing; the call is skipped
  2. B.It returns 0
  3. C.Undefined behaviour, usually a crash; check the pointer before calling
  4. D.The compiler calls a default function
Answer & explanation

Correct answer: Undefined behaviour, usually a crash; check the pointer before calling

A NULL function pointer points to no code, so jumping to it fails.

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 →