Arrays, Strings & Bounded Buffers
Array decay, explicit extents, C-string termination, spans, checked size arithmetic, and bounded buffer APIs.
Interactive lab
This page is a live simulation rather than a written lesson: enable JavaScript to use its controls, visualizations, and code traces. The written lessons for this subject are linked below.
More in Embedded C
- Structs, Unions, Enums & TypedefStructs, unions, enums, typedef aliases, bit-fields, designated initialization, tagged variants, and opaque handles.
- Practice, Interviews & CapstonesDiagnostics, focused C practice, contextual DSA bridges, compiled examples, production projects, and design-defense prompts.
- Types, Promotion & ArithmeticInteger widths, signedness, promotion, conversions, overflow, qualifiers, floating point, size, and alignment.
- MMIO, Volatile & Access SemanticsMemory-mapped I/O, volatile guarantees, read and write side effects, read-modify-write hazards, barriers, and assembly evidence.
- Functions, Modules & ContractsFunction declarations, parameters, callbacks, linkage, reentrancy, error contracts, opaque modules, HAL seams, and failure states.
- Interrupts, Atomicity & PublicationInterrupt context, latency, shared state, atomic width, critical sections, ordering, publication, and deferred work.
- Compiler WorkbenchEdit C, compile for embedded targets, inspect diagnostics, assembly, sections, symbols, code size, and run a host-side test harness.
- Bits, Fields, Endianness & EncodingsSafe mask construction, field extraction and insertion, shifts, Gray code, endianness, packing, and representation boundaries.
- State Machines, Dispatch & TimeoutsExplicit state, events, transition tables, function-pointer dispatch, timers, timeouts, invalid states, and exhaustive tests.
- Fixed-Point Range, Scaling & SaturationQ formats, range and resolution, intermediate width, rounding, saturation, accumulated error, and integer DSP implementation.
- Serialization, Framing & Defensive ParsingExplicit byte order, field encoding, frame boundaries, resynchronization, checked arithmetic, transactional output, and hostile-input parsing.
- Stack, Pools, Arenas & AllocationBounded memory planning with stack budgets, fixed pools, arenas, fragmentation models, allocation failure, and instrumentation.