OhmsCode.
CURATED LIST · 30 PROBLEMS

Embedded C essentials

Pointers, lifetime, integer rules and register access: the C that firmware interviews lean on.

Status# ↑TitleTopicTypeDifficultyAcceptance
Not attempted1Count active flagsFREEBits & registersC codeMedium81%
Not attempted2The length that wrappedEmbedded CDebugMedium—
Not attempted3Clear one enable bitTODAY · FREEBits & registersMCQEasy—
Not attempted4Three meanings of staticEmbedded CExplainEasy—
Not attempted5Extract an unsigned fieldBits & registersNumericEasy—
Not attempted6Reverse a byteBits & registersC codeMedium—
Not attempted7The callback kept a stack addressEmbedded CDebugMedium—
Not attempted8A status register with a catchFREEBits & registersMCQEasy—
Not attempted9A safer buffer interfaceEmbedded CExplainEasy—
Not attempted10Sample buffer sizeEmbedded CNumericEasy—
Not attempted11Sum a bounded packetEmbedded CC codeMedium—
Not attempted12The truncated string that kept readingEmbedded CDebugMedium—
Not attempted13A pointer outlives its objectEmbedded CMCQEasy—
Not attempted14Read-modify-write hazardFREEBits & registersExplainEasy—
Not attempted15Insert a mode without changing the upper byteBits & registersNumericEasy—
Not attempted16Saturating byte additionEmbedded CC codeMedium—
Not attempted17Negative length becomes a huge transferEmbedded CDebugMedium—
Not attempted18Read-only through this pointerEmbedded CMCQEasy—
Not attempted19A packet parser's ownership contractEmbedded CExplainMedium—
Not attempted20Count enabled pending sourcesBits & registersNumericEasy—
Not attempted21Encode a little-endian register valueBits & registersC codeMedium—
Not attempted22The pointer lost on realloc failureEmbedded CDebugMedium—
Not attempted23The visibility trapFREEEmbedded CMCQEasy—
Not attempted24Const at the driver boundaryEmbedded CExplainMedium—
Not attempted25Align the next DMA descriptorBits & registersNumericEasy—
Not attempted26Extract a field with checked boundariesBits & registersC codeMedium—
Not attempted27The unsigned reverse loop never stopsEmbedded CDebugMedium—
Not attempted28One past the endEmbedded CMCQEasy—
Not attempted29Alignment without casting away the problemEmbedded CExplainMedium—
Not attempted30Decode a little-endian sampleBits & registersNumericEasy—