Loading…
Loading your practice…
Firmware interview practice
101 embedded C problems, judged for real — with the exact line and column of every fault.
#include <stdint.h>int main(void) {uint8_t packet[4] = {0xAA, 0x10, 0x01, 0x00};// The fifth byte is outside this buffer.packet[4] = 0xFF;return 0;}
Runtime errorline 7, column 5
Out-of-bounds write: 0 bytes past the end of packet, which is 4 bytes.
Check the index against the object's length.
101 problems
16 lessons
9 prompts
100 questions
Signature, examples, constraints.
Failures point to the exact line and column.
Hidden tests included. Accepted means solved.
Try one without an account
Set bit 2 without changing the others. Select a bit to toggle it.
0x10Target: 0x14. Keep the other bits as they were.
value |= (1u << 2);OR with a mask sets bit 2 and preserves every other bit.