OhmsCode.
CURRICULUM / ORIGINAL PRACTICE

Embedded C

Reason about object lifetime, pointers and types before reaching for a compiler.

Make the memory model work for you.

Work through the assumptions, explain the mechanism, and connect it to a practical test. The questions below cover embedded c within the junior embedded firmware role.

Start by writing what you expect, then identify what observation would prove you wrong. Keep target-specific behavior separate from portable C reasoning.

Try it before your sprint.

Public samples reveal deterministic explanations after you submit. Open-ended answers require a verified account to submit.

Explore six samples
Status#TitleTopicTypeDifficultyAcceptance
Not attempted5A pointer outlives its objectEmbedded CMCQEasy—
Not attempted6Read-only through this pointerEmbedded CMCQEasy—
Not attempted7The visibility trapFREEEmbedded CMCQEasy—
Not attempted8One past the endEmbedded CMCQEasy—
Not attempted9Signed overflowEmbedded CMCQEasy—
Not attempted17Sample buffer sizeEmbedded CNumericEasy—
Not attempted22Sum a bounded packetEmbedded CC codeMedium—
Not attempted26Saturating byte additionEmbedded CC codeMedium—
Not attempted31The length that wrappedEmbedded CDebugMedium—
Not attempted44Walk a bounded TLV packetEmbedded CC codeMedium—
Not attempted45Fixed-window moving averageEmbedded CC codeMedium—
Not attempted46Merge sorted event timestampsEmbedded CC codeMedium—
Not attempted47Saturating signed Q15 additionEmbedded CC codeMedium—
Not attempted48Decode escaped serial payload bytesEmbedded CC codeMedium—
Not attempted50Read a circular log in chronological orderEmbedded CC codeMedium—
Not attempted51The callback kept a stack addressEmbedded CDebugMedium—
Not attempted52The truncated string that kept readingEmbedded CDebugMedium—
Not attempted53Negative length becomes a huge transferEmbedded CDebugMedium—
Not attempted54The pointer lost on realloc failureEmbedded CDebugMedium—
Not attempted55The unsigned reverse loop never stopsEmbedded CDebugMedium—
Not attempted56The packet length read through a castEmbedded CDebugMedium—
Not attempted57Structure equality changes between buildsEmbedded CDebugMedium—
Not attempted58A macro consumed two samplesEmbedded CDebugMedium—
Not attempted59Release-only behavior from signed overflowEmbedded CDebugMedium—
Not attempted60A shared formatting buffer corrupted logsEmbedded CDebugMedium—
Not attempted121Array size at a call boundaryEmbedded CMCQEasy—
Not attempted122Copying overlapping samplesEmbedded CMCQEasy—
Not attempted123Checking packet allocation multiplicationEmbedded CMCQEasy—
Not attempted124The character signedness assumptionEmbedded CMCQEasy—
Not attempted125A function pointer callbackEmbedded CMCQEasy—
Not attempted126The realloc failure pathEmbedded CMCQEasy—
Not attempted127Integer promotion before complementEmbedded CMCQEasy—
Not attempted128A macro evaluates an argument twiceEmbedded CMCQEasy—
Not attempted129Comparing structures with paddingEmbedded CMCQEasy—
Not attempted130Restrict is a promiseEmbedded CMCQEasy—
Not attempted131Keeping bytes away from string APIsEmbedded CMCQEasy—
Not attempted132Pointer arithmetic has an element sizeEmbedded CMCQEasy—
Not attempted133Checking a compile-time hardware assumptionEmbedded CMCQEasy—
Not attempted134The unsigned countdown trapEmbedded CMCQEasy—
Not attempted135One definition and several declarationsEmbedded CMCQEasy—
Not attempted215Space for a bounded message stringEmbedded CNumericEasy—
Not attempted217A packet parser's ownership contractEmbedded CExplainMedium—
Not attempted218Const at the driver boundaryEmbedded CExplainMedium—
Not attempted219Alignment without casting away the problemEmbedded CExplainMedium—
Not attempted220Null terminators and capacityEmbedded CExplainMedium—
Not attempted221Making an allocation-free moduleEmbedded CExplainMedium—
Not attempted222Static storage and reentrancyEmbedded CExplainMedium—
Not attempted223Choosing error representations in CEmbedded CExplainMedium—
Not attempted224When an enum is not a protocol byteEmbedded CExplainMedium—
Not attempted225A signed length crosses an APIEmbedded CExplainMedium—
Not attempted226Saturating and wrapping arithmeticEmbedded CExplainMedium—
Not attempted227Designing a generic callback contextEmbedded CExplainMedium—
Not attempted228The cost of packed structuresEmbedded CExplainMedium—
Not attempted229Compile-time configuration boundariesEmbedded CExplainMedium—
Not attempted230Integer-to-pointer MMIO castsEmbedded CExplainMedium—
Not attempted231Floating-point equality in control codeEmbedded CExplainMedium—
Not attempted232Testing a pure calculation separatelyEmbedded CExplainMedium—
Not attempted341Three meanings of staticEmbedded CExplainEasy—
Not attempted342A safer buffer interfaceEmbedded CExplainEasy—
Not attempted356The logger reads beyond a packet nameEmbedded CDebugMedium—
Not attempted357A huge timeout survives the parserEmbedded CDebugMedium—
Not attempted358A release build never starts conversionEmbedded CDebugMedium—
Not attempted359The sort comparator fails at extreme valuesEmbedded CDebugMedium—
Not attempted360Initialization leaks after callback failureEmbedded CDebugMedium—
Not attempted361A packet struct works only on one hostEmbedded CDebugMedium—
Not attempted362A flexible payload allocation wrapsEmbedded CDebugMedium—
Not attempted363A text conversion overwrites its own sourceEmbedded CDebugMedium—
Not attempted396A string literal is not writable storageEmbedded CMCQEasy—
Not attempted397Recovering from snprintf truncationEmbedded CMCQEasy—
Not attempted398A pointer to a const objectEmbedded CMCQEasy—
Not attempted399Effective type of a float objectEmbedded CMCQEasy—
Not attempted400Empty objects from callocEmbedded CMCQEasy—
Not attempted401An enum's invalid wire valueEmbedded CMCQEasy—
Not attempted402Using a freed buffer only for comparisonEmbedded CMCQEasy—
Not attempted403Size of a flexible array allocationEmbedded CMCQEasy—
Not attempted404Format specifier for a fixed-width valueEmbedded CMCQEasy—
Not attempted405A function with a missing return pathEmbedded CMCQEasy—
Not attempted406Unsigned operands enter a comparisonEmbedded CMCQEasy—
Not attempted407A C logical expression short-circuitsEmbedded CMCQEasy—
Not attempted408Choosing a compare function for sortingEmbedded CMCQEasy—
Not attempted409Rounding an unsigned division upwardEmbedded CMCQEasy—
Not attempted410The contract of strlenEmbedded CMCQEasy—
Not attempted411Compound literal lifetimeEmbedded CMCQEasy—
Not attempted498Space for a hexadecimal representationEmbedded CNumericEasy—
Not attempted499Structure layout under explicit ABI rulesEmbedded CNumericEasy—
Not attempted500Q15 product with explicit scalingEmbedded CNumericEasy—
Not attempted501A signed saturation boundaryEmbedded CNumericEasy—
Not attempted502A pool with per-block alignmentEmbedded CNumericEasy—
Not attempted516Designing a length-delimited text viewEmbedded CExplainMedium—
Not attempted517Error cleanup after partial initializationEmbedded CExplainMedium—
Not attempted518An API that accepts overlapping spansEmbedded CExplainMedium—
Not attempted519Recovering a decimal configuration value safelyEmbedded CExplainMedium—
Not attempted520Dependency injection for a hardware-independent driverEmbedded CExplainMedium—
Not attempted521A bounded fixed-point low-pass filterEmbedded CExplainMedium—