An interrupt vector table is an array of function pointers, placed by the linker at a hardware-defined address. Each entry corresponds to an interrupt source, reset, fault handlers, SysTick, each peripheral IRQ. When an interrupt fires, the CPU hardware indexes this table by the interrupt number and jumps to the function pointer stored there, which is your handler. On ARM Cortex-M, entry 0 is even the initial stack-pointer value and entry 1 is the reset handler, so the table mixes a data word with function pointers. You provide the table (often in startup code) with a section attribute so the linker script places it correctly, and you populate it with your _Handler functions. This is why understanding function pointers is foundational for embedded: the entire interrupt mechanism is hardware dispatching through a table of them, and registering a handler is just writing a function pointer into the right slot.
C Programming · Interview question
How do interrupt vector tables relate to function pointers?
A strong answer
What a weak answer sounds like
You know the answer. Do you know what gets you dinged?
Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.
From the lesson
Function Pointers & Callbacks
Store a function in a variable, pass behavior as an argument, and build dispatch tables: the mechanism behind qsort, HAL callbacks, and interrupt vector tables.