Firmware · Embedded C · RTOS · Linux kernel
Crack your next embedded interview.
Hand-written questions with model answers, hands-on coding problems, quizzes and deep-dive articles, from C basics up to Linux device drivers. Free, no sign-up.
Learn by topic
All topics →C Programming
Keywords, storage classes, scope, the preprocessor, integer rules, undefined behaviour and the questions every C interview starts with.
Pointers & Memory
Pointer arithmetic, arrays vs pointers, the memory layout of a C program, stack vs heap, memory pools, alignment, endianness and strict aliasing.
Embedded C
volatile, ISRs, registers, critical sections, start-up code, linker scripts, AAPCS, intrinsics, bootloaders and writing firmware that survives real hardware.
Bit Manipulation
Bitwise operators, masks, shifts, counting bits, powers of two and the classic whiteboard puzzles.
Microcontrollers & ARM Cortex-M
Arm architecture (RISC, Cortex-M vs A vs R, Cortex-A53), the Cortex-M core, NVIC, faults, MPU, TrustZone, caches, clocks, GPIO, timers, ADC/DAC, DMA, low power and debug.
RTOS & Real-Time Systems
Scheduling, task states, context switches, semaphores vs mutexes, priority inversion and inheritance, deadlock, queues, notifications, RMS and response-time analysis, stacks, timers, SMP, FreeRTOS and Zephyr internals.
Communication Protocols
UART, RS-232/RS-485, SPI, I2C, I3C, I2S, CAN, CAN FD, LIN, USB, Modbus, Ethernet, TCP/UDP, MQTT, BLE and wireless IoT. Frames, timing, arbitration, error handling and how to choose.
Linux Kernel & Device Drivers
Kernel modules, char drivers with ioctl, the driver model, device tree, I2C/SPI client drivers, GPIO/pinctrl/clocks, interrupts, bottom halves, locking, wait queues, timers, memory, DMA, mmap, power management, PREEMPT_RT, debugging and DRM.
Embedded Linux & Boot
The full boot flow from boot ROM to U-Boot to start_kernel to init, root filesystems, Yocto and Buildroot, cross-compilation, OTA updates and secure boot.
Operating System Concepts
Processes and threads, process states, context switches, scheduling with worked examples, CFS/EEVDF, virtual memory, page tables, TLB maths, page replacement, synchronisation and I/O.
Linux System Programming
Signals, fork bombs and resource limits, pthread_exit, /proc /sys /dev, permissions, inodes and links, file system layouts, mmap and mprotect, the page cache, sockets, epoll and the networking stack.
Data Structures & Algorithms
Complexity, linked lists, ring buffers, stacks, queues, heaps and priority queues, hashing, trees, graphs, sorting and searching, CRC and filters, written for memory-constrained systems.
Arrays & Strings (Coding Round)
The classic whiteboard programs in C: second largest, rotate, leaders, Kadane, sliding window, trapping rain water, palindromes, anagrams and reversing words.
C++ for Embedded
Classes, virtual functions and vtables, CRTP, RAII, move semantics, templates, constexpr, smart pointers, placement new, extern "C", std::array/span, and which C++ features are safe on a microcontroller.
Electronics & Hardware Basics
Ohm's law and power, pull-ups, GPIO modes, LEDs, level shifting, decoupling, LDO vs buck, ADC/DAC, Nyquist, filters, oscillators, MOSFETs, flyback diodes, ESD, signal integrity, low power, schematics and bring-up.
Debugging, Testing & Tools
Debugging intermittent bugs, HardFault analysis, JTAG/SWD, GDB, breakpoints and watchpoints, printf vs trace (ITM/SWO/RTT), memory corruption, unit testing and mocking, HIL and CI, coverage, static analysis, build systems, map files, code size and git bisect.
Virtualization (QEMU & KVM)
Emulation vs virtualization, ARM exception levels and EL2, QEMU code flow, TCG, QOM devices, memory regions, the KVM ioctl loop, VM exits, stage-2 translation, vGIC and virtio.
"Coding: Memory & String Functions"
Write the C library yourself: strlen, strcpy, strcmp, strcat, memcpy, memset, aligned_malloc, calloc, double-free and leak detection, slab allocators and string utilities.
"Coding: Sorting & Array Problems"
Insertion, selection, quick and merge sort in C, plus largest element, duplicates, Dutch flag (sort 0/1/2), merge intervals, 3Sum, maximum product of three and find-the-duplicate.
"Coding: Linked Lists, Stacks & Queues"
Every linked-list operation interviewers ask (insert, delete, nth from end, merge, k-group reverse, intersection, loop removal), Linux-style list_head, stacks, queues, min stack, infix to postfix and an LRU cache in C.
"Coding: Embedded Drivers, Buffers & Schedulers"
UART TX/RX, SPI and I2C transfer functions, busy-wait delays, lock-free SPSC ring buffers, overwrite and blocking queues, software timers, a cooperative scheduler, watchdog service, traffic-light and driver state machines, DMA descriptor rings.
"Coding: Concurrency Primitives"
Build synchronisation primitives in C: atomic increment, spinlock, mutex with compare-and-swap, semaphore from mutex + condition variable, reader-writer lock, reference counting, once-only initialisation and timed waits.
"Coding: Systems, Bitmaps & Virtualization"
Bitmap allocators, find-first-zero, count leading zeros, single number II, page-table walk simulation, guest memory lookup, an MMIO device model, a virtqueue parser, dirty-page tracking, graph cycle detection and topological sort for device init order.
Practice problems
See all →Latest articles
See all →How to use this site
Work through a topic. Each answer is written the way you would say it in an interview: the short version first, then the detail.
Solve the practice problems without looking. Run your code in Compiler Explorer, then compare with the reference solution.
Mark questions done. Your progress is saved in your browser, so you can see what is left before the interview.